mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-17 18:46:40 +00:00
Improve error handling in reconnection logic by logging failures and raising exceptions
This commit is contained in:
parent
4315ddbb57
commit
e90d204287
@ -317,11 +317,11 @@ class Sender:
|
||||
if delay is not True:
|
||||
await asyncio.sleep(delay)
|
||||
continue
|
||||
elif delay is not None:
|
||||
self._logger.info(
|
||||
f"waiting {delay} seconds before next reconnection attempt"
|
||||
else:
|
||||
self._logger.error(
|
||||
f"auto-reconnect failed {attempts} time(s); giving up"
|
||||
)
|
||||
await asyncio.sleep(delay)
|
||||
raise
|
||||
|
||||
def _try_fill_write(self) -> None:
|
||||
if not self._requests:
|
||||
|
Loading…
Reference in New Issue
Block a user