Message ID | 270c0c8bdc802c04fd3021c082d58cf8e8d68d82.1729018312.git.steve@sakoman.com |
---|---|
State | New |
Headers | show |
Series | [scarthgap,2.8] asyncrpc: Use client timeout for websocket open timeout | expand |
diff --git a/lib/bb/asyncrpc/client.py b/lib/bb/asyncrpc/client.py index a350b4fb1..6fa2839f4 100644 --- a/lib/bb/asyncrpc/client.py +++ b/lib/bb/asyncrpc/client.py @@ -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