Commit 0e70fd26 authored by dieter's avatar dieter

fix

parent 052ac888
......@@ -127,10 +127,12 @@ class Protocol(base.Protocol):
@cr.add_done_callback
def done_connecting(future):
try:
future.exception()
except Exception:
logger.exception("Connection to %r failed", self.addr)
if future.cancelled():
logger.info("Connection to %r cancelled", self.addr)
elif future.exception() is not None:
logger.info("Connection to %r failed, %s",
(self.addr, future.exception()))
else: return
# keep trying
if not self.closed:
logger.info("retry connecting %r", self.addr)
......@@ -139,6 +141,7 @@ class Protocol(base.Protocol):
self.connect,
)
def connection_made(self, transport):
super(Protocol, self).connection_made(transport)
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