From 6a01ae03e36321f3faacc6aded88ab1213f56feb Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 14 Aug 2016 16:10:24 +0100 Subject: [PATCH] Replace SHUTDOWN with Channel.send(_DEAD) --- econtext/core.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/econtext/core.py b/econtext/core.py index ac8de96f..ce8cf78f 100644 --- a/econtext/core.py +++ b/econtext/core.py @@ -31,7 +31,6 @@ IOLOG = logging.getLogger('econtext.io') GET_MODULE = 100L CALL_FUNCTION = 101L FORWARD_LOG = 102L -SHUTDOWN = 103L class Error(Exception): @@ -407,16 +406,10 @@ class Context(object): self._last_handle = 1000L self._handle_map = {} self._lock = threading.Lock() - self.add_handle_cb(self._shutdown, SHUTDOWN) def on_shutdown(self): """Slave does nothing, _broker_main() will shutdown its streams.""" - def _shutdown(self, data): - if data != _DEAD and self.stream: - LOG.debug('Received SHUTDOWN') - self.broker.shutdown() - def on_disconnect(self): self.stream = None LOG.debug('Parent stream is gone, dying.')