Server-side websocket timeout: 3 -> 5 seconds

This commit is contained in:
Fabio Manganiello 2018-04-10 00:10:03 +02:00
parent ef1843fdbc
commit 4efbcc50dd

View file

@ -125,8 +125,8 @@ class HttpBackend(Backend):
while True: while True:
try: try:
waiter = await websocket.ping() waiter = await websocket.ping()
await asyncio.wait_for(waiter, timeout=3) await asyncio.wait_for(waiter, timeout=5)
time.sleep(3) time.sleep(5)
except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed) as e: except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed) as e:
close = False close = False
if isinstance(e, asyncio.TimeoutError): if isinstance(e, asyncio.TimeoutError):