From 4efbcc50dda2df5ca95420caa0970f81238b4210 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 10 Apr 2018 00:10:03 +0200 Subject: [PATCH] Server-side websocket timeout: 3 -> 5 seconds --- platypush/backend/http/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/__init__.py b/platypush/backend/http/__init__.py index 0e2ea7e3c..45a439312 100644 --- a/platypush/backend/http/__init__.py +++ b/platypush/backend/http/__init__.py @@ -125,8 +125,8 @@ class HttpBackend(Backend): while True: try: waiter = await websocket.ping() - await asyncio.wait_for(waiter, timeout=3) - time.sleep(3) + await asyncio.wait_for(waiter, timeout=5) + time.sleep(5) except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed) as e: close = False if isinstance(e, asyncio.TimeoutError):