Commit 0e70fd26 authored by dieter's avatar dieter

fix

parent 052ac888
...@@ -127,10 +127,12 @@ class Protocol(base.Protocol): ...@@ -127,10 +127,12 @@ 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",
(self.addr, future.exception()))
else: return
# keep trying # keep trying
if not self.closed: if not self.closed:
logger.info("retry connecting %r", self.addr) logger.info("retry connecting %r", self.addr)
...@@ -139,6 +141,7 @@ class Protocol(base.Protocol): ...@@ -139,6 +141,7 @@ class Protocol(base.Protocol):
self.connect, self.connect,
) )
def connection_made(self, transport): def connection_made(self, transport):
super(Protocol, self).connection_made(transport) super(Protocol, self).connection_made(transport)
self.heartbeat(write=False) self.heartbeat(write=False)
......
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