mirror of
https://github.com/acgnhiki/blrec.git
synced 2024-12-27 17:10:18 +08:00
fix: workaround for receiving danmu messages continuously timed out
This commit is contained in:
parent
8ad8d53a34
commit
2ad6847f42
@ -267,6 +267,9 @@ class DanmakuClient(EventEmitter[DanmakuListener], AsyncStoppableMixin):
|
|||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
wsmsg = await self._ws.receive(timeout=self._HEARTBEAT_INTERVAL)
|
wsmsg = await self._ws.receive(timeout=self._HEARTBEAT_INTERVAL)
|
||||||
|
except asyncio.TimeoutError as e:
|
||||||
|
logger.debug(f'Failed to receive message due to: {repr(e)}')
|
||||||
|
continue
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await self._handle_error(e)
|
await self._handle_error(e)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user