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...") log.info("Connecting...")
await self.protocol.connect(self.address) await self.protocol.connect(self.address)
except OSError as e: except OSError as e:
log.warning(e) # TODO: Remove log.warning(f"Unable to connect due to network issues: {e}")
self.protocol.close() self.protocol.close()
await asyncio.sleep(1) await asyncio.sleep(1)
else: else: