We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45e97b8 commit 4f67c95Copy full SHA for 4f67c95
src/engineio/asyncio_client.py
@@ -520,10 +520,13 @@ async def _read_loop_websocket(self):
520
p = await asyncio.wait_for(
521
self.ws.receive(),
522
timeout=self.ping_interval + self.ping_timeout)
523
- p = p.data
524
- if p is None: # pragma: no cover
+ if not isinstance(p.data, (str, bytes)): # pragma: no cover
+ self.logger.warning(
525
+ 'Server sent unexpected packet %s data %s, aborting',
526
+ str(p.type), str(p.data))
527
await self.queue.put(None)
528
break # the connection is broken
529
+ p = p.data
530
except asyncio.TimeoutError:
531
self.logger.warning(
532
'Server has stopped communicating, aborting')
0 commit comments