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: 270c0c8bdc802c04fd3021c082d58cf8e8d68d82)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 23681775e5941e54ebead469addf708fca1e6beb)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Joshua Watt
2024-06-03 10:44:03 -06:00
committed by Steve Sakoman
parent 200d12b6a5
commit a34743f178

View File

@@ -87,7 +87,11 @@ class AsyncClient(object):
import websockets
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