Commit beb16d0d authored by David Wilson's avatar David Wilson

master: helper functions to force disconnect everything

parent 9b5d0a9b
......@@ -615,6 +615,13 @@ class Router(mitogen.parent.Router):
child = parent
parent = parent.via
def disconnect_stream(self, stream):
self.broker.defer(stream.on_disconnect, self.broker)
def disconnect_all(self):
for stream in self._stream_by_id.values():
self.disconnect_stream(stream)
class IdAllocator(object):
def __init__(self, router):
......
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