Commit b181b08b authored by Vincent Pelletier's avatar Vincent Pelletier

Call closure callback when aborting.

parent e394cb3d
...@@ -480,6 +480,9 @@ class Connection(BaseConnection): ...@@ -480,6 +480,9 @@ class Connection(BaseConnection):
neo.lib.logging.debug('aborting a connector for %r', self) neo.lib.logging.debug('aborting a connector for %r', self)
self.aborted = True self.aborted = True
assert self.write_buf assert self.write_buf
if self._on_close is not None:
self._on_close()
self._on_close = None
def writable(self): def writable(self):
"""Called when self is writable.""" """Called when self is writable."""
......
...@@ -406,8 +406,6 @@ class Application(object): ...@@ -406,8 +406,6 @@ class Application(object):
if node.isMaster(): if node.isMaster():
continue continue
conn = node.getConnection() conn = node.getConnection()
if node.isClient() and conn.isAborted():
continue
node.notify(notification_packet) node.notify(notification_packet)
if node.isClient(): if node.isClient():
if state != ClusterStates.RUNNING: if state != ClusterStates.RUNNING:
......
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