From c88bee1a5e336cc589eb7d7e5f31db43e8836611 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Mon, 3 Jun 2024 10:44:03 -0600 Subject: [PATCH] bitbake: asyncrpc: Use client timeout for websocket open timeout The default connection timeout for websockets is 10 seconds, so use the provided client timeout instead (which defaults to 30 seconds). (Bitbake rev: 23681775e5941e54ebead469addf708fca1e6beb) Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- bitbake/lib/bb/asyncrpc/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/asyncrpc/client.py b/bitbake/lib/bb/asyncrpc/client.py index 11179b0fcb..9be49261c0 100644 --- a/bitbake/lib/bb/asyncrpc/client.py +++ b/bitbake/lib/bb/asyncrpc/client.py @@ -112,7 +112,11 @@ class AsyncClient(object): ) async def connect_sock(): - websocket = await websockets.connect(uri, ping_interval=None) + websocket = await websockets.connect( + uri, + ping_interval=None, + open_timeout=self.timeout, + ) return WebsocketConnection(websocket, self.timeout) self._connect_sock = connect_sock