Log in case connection fails (to test ipv6)

This commit is contained in:
Dan 2018-06-13 13:39:06 +02:00
parent ade1c2f377
commit d38d23f46d

View File

@ -53,7 +53,8 @@ class Connection:
try: try:
log.info("Connecting...") log.info("Connecting...")
self.connection.connect(self.address) self.connection.connect(self.address)
except OSError: except OSError as e:
log.warning(e) # TODO: Remove
self.connection.close() self.connection.close()
time.sleep(1) time.sleep(1)
else: else: