Give some breath to the websocket ping loop
This commit is contained in:
parent
07219bef89
commit
fc608317fd
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ class HttpBackend(Backend):
|
||||||
try:
|
try:
|
||||||
waiter = await websocket.ping()
|
waiter = await websocket.ping()
|
||||||
await asyncio.wait_for(waiter, timeout=5)
|
await asyncio.wait_for(waiter, timeout=5)
|
||||||
|
time.sleep(0.1)
|
||||||
except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed) as e:
|
except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed) as e:
|
||||||
logging.info('Client {} closed connection'.format(websocket.remote_address[0]))
|
logging.info('Client {} closed connection'.format(websocket.remote_address[0]))
|
||||||
self.active_websockets.remove(websocket)
|
self.active_websockets.remove(websocket)
|
||||||
|
|
Loading…
Reference in a new issue