From 0f08783330f0e1e82a377eb5afb073b838e573bc Mon Sep 17 00:00:00 2001 From: David Wilson Date: Mon, 26 Mar 2018 11:52:12 +0545 Subject: [PATCH] core: fix NameError on disconnect --- mitogen/core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mitogen/core.py b/mitogen/core.py index 52fd79a9..3a66ff30 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -863,7 +863,7 @@ class Context(object): def __reduce__(self): return _unpickle_context, (self.context_id, self.name) - def on_disconnect(self, broker): + def on_disconnect(self): _v and LOG.debug('%r.on_disconnect()', self) fire(self, 'disconnect') @@ -1141,7 +1141,7 @@ class Router(object): stream_ = self._stream_by_id.get(context.context_id) if stream_ is stream: del self._stream_by_id[context.context_id] - context.on_disconnect(broker) + context.on_disconnect() def on_broker_shutdown(self): for context in self._context_by_id.itervalues(): @@ -1487,7 +1487,6 @@ class ExternalContext(object): # Reopen with line buffering. sys.stdout = os.fdopen(1, 'w', 1) - def _dispatch_one(self, msg): data = msg.unpickle(throw=False) _v and LOG.debug('_dispatch_calls(%r)', data)