master: helper functions to force disconnect everything

pull/79/head
David Wilson 7 years ago
parent 4a431a1a85
commit bb662a1a0b

@ -615,6 +615,13 @@ class Router(mitogen.parent.Router):
child = parent child = parent
parent = parent.via 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): class IdAllocator(object):
def __init__(self, router): def __init__(self, router):

Loading…
Cancel
Save