Uniformly call Context.on_disconnect(), not just for parent.

pull/35/head
David Wilson 7 years ago
parent 64f628d590
commit a87194a9b8

@ -717,12 +717,10 @@ class Router(object):
def on_disconnect(self, stream, broker):
"""Invoked by Stream.on_disconnect()."""
if not self.parent_context:
return
parent_stream = self._stream_by_id[self.parent_context.context_id]
if parent_stream is stream and self.parent_context:
self.parent_context.on_disconnect(broker)
for context in self._context_by_id.itervalues():
if self._stream_by_id[context.context_id] is stream:
del self._stream_by_id[context.context_id]
context.on_disconnect(broker)
def on_shutdown(self):
for context in self._context_by_id.itervalues():

Loading…
Cancel
Save