Message ID | 20240603164403.662265-1-JPEWhacker@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bitbake-devel] asyncrpc: Use client timeout for websocket open timeout | expand |
diff --git a/bitbake/lib/bb/asyncrpc/client.py b/bitbake/lib/bb/asyncrpc/client.py index 11179b0fcbe..9be49261c0f 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
The default connection timeout for websockets is 10 seconds, so use the provided client timeout instead (which defaults to 30 seconds). Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- bitbake/lib/bb/asyncrpc/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)