asyncrpc: Use client timeout for websocket open timeout
PATCH 1/1 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).
Signed-off-by Joshua Watt <[email protected]>
--- bitbake/lib/bb/asyncrpc/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
bitbake/lib/bb/asyncrpc/client.py +5 -1
@@ -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
Signature · 1 line
2.43.2