2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Add more verbose error in case of network issues

This commit is contained in:
Dan 2020-12-07 19:11:26 +01:00
parent d2023c39ae
commit 3c8f41b1d2

View File

@ -54,7 +54,7 @@ class Connection:
log.info("Connecting...")
await self.protocol.connect(self.address)
except OSError as e:
log.warning(e) # TODO: Remove
log.warning(f"Unable to connect due to network issues: {e}")
self.protocol.close()
await asyncio.sleep(1)
else: