Skip to content

Commit

Permalink
Detect unreported websocket closures in async client (Fixes miguelgri…
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 22, 2019
1 parent 33c7cf1 commit a67b3d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engineio/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ async def _read_loop_websocket(self):
p = None
try:
p = (await self.ws.receive()).data
if p is None: # pragma: no cover
raise RuntimeError('WebSocket read returned None')
except aiohttp.client_exceptions.ServerDisconnectedError:
self.logger.info(
'Read loop: WebSocket connection was closed, aborting')
Expand Down

0 comments on commit a67b3d7

Please sign in to comment.