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 <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt 2024-06-03 10:44:03 -06:00 committed by Richard Purdie
parent 6a8a554476
commit c88bee1a5e

View File

@ -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