[2.8][PATCH] asyncrpc: Use client timeout for websocket open timeout
A message that is not in the archive (sent off-list or not yet received): [email protected]
From: Joshua Watt <[email protected]>
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]>
Signed-off-by Richard Purdie <[email protected]>
(cherry picked from commit 23681775e5941e54ebead469addf708fca1e6beb)
Signed-off-by Steve Sakoman <[email protected]>
--- lib/bb/asyncrpc/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
lib/bb/asyncrpc/client.py +5 -1
@@ -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
Signature · 1 line
2.34.1