Log failure to connect

This commit is contained in:
Joscha 2018-08-08 17:01:27 +00:00
parent ceaf8748e9
commit 6ed513efd9

View file

@ -106,6 +106,7 @@ class Connection:
)
self._ws = await asyncio.wait_for(ws, timeout)
except (websockets.InvalidHandshake, socket.gaierror, asyncio.TimeoutError): # not websockets.InvalidURI
logger.warn(f"Connection attempt failed, {tries} tries left.")
self._ws = None
if tries is not None: