Commit 0e70fd26 authored by dieter's avatar dieter

fix

parent 052ac888
...@@ -127,17 +127,20 @@ class Protocol(base.Protocol): ...@@ -127,17 +127,20 @@ class Protocol(base.Protocol):
@cr.add_done_callback @cr.add_done_callback
def done_connecting(future): def done_connecting(future):
try: if future.cancelled():
future.exception() logger.info("Connection to %r cancelled", self.addr)
except Exception: elif future.exception() is not None:
logger.exception("Connection to %r failed", self.addr) logger.info("Connection to %r failed, %s",
# keep trying (self.addr, future.exception()))
if not self.closed: else: return
logger.info("retry connecting %r", self.addr) # keep trying
self.loop.call_later( if not self.closed:
self.connect_poll + local_random.random(), logger.info("retry connecting %r", self.addr)
self.connect, self.loop.call_later(
) self.connect_poll + local_random.random(),
self.connect,
)
def connection_made(self, transport): def connection_made(self, transport):
super(Protocol, self).connection_made(transport) super(Protocol, self).connection_made(transport)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment