diff --git a/platypush/backend/http/__init__.py b/platypush/backend/http/__init__.py index 4093703c..b9b37b72 100644 --- a/platypush/backend/http/__init__.py +++ b/platypush/backend/http/__init__.py @@ -123,6 +123,7 @@ class HttpBackend(Backend): try: waiter = await websocket.ping() await asyncio.wait_for(waiter, timeout=5) + time.sleep(0.1) except (asyncio.TimeoutError, websockets.exceptions.ConnectionClosed) as e: logging.info('Client {} closed connection'.format(websocket.remote_address[0])) self.active_websockets.remove(websocket)