fix: fix ConnectionResetError

This commit is contained in:
acgnhik 2022-06-07 10:49:22 +08:00
parent 0f666eaafe
commit a9d8de964d

View File

@ -87,7 +87,9 @@ class DanmakuClient(EventEmitter[DanmakuListener], AsyncStoppableMixin):
@retry(
wait=wait_exponential(multiplier=0.1, max=10),
retry=retry_if_exception_type((asyncio.TimeoutError, aiohttp.ClientError)),
retry=retry_if_exception_type(
(asyncio.TimeoutError, aiohttp.ClientError, ConnectionError)
),
)
async def _connect(self) -> None:
logger.debug('Connecting to server...')