From 586c6aca9a0685603c8e71c42b2e3f440cd43bd8 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 4 Nov 2018 11:52:02 +0000 Subject: [PATCH] issue #406: unix: fix ordering of stop_receive/close. --- mitogen/unix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitogen/unix.py b/mitogen/unix.py index e691fe71..12182a28 100644 --- a/mitogen/unix.py +++ b/mitogen/unix.py @@ -82,9 +82,9 @@ class Listener(mitogen.core.BasicStream): router.broker.start_receive(self) def on_shutdown(self, broker): + broker.stop_receive(self) self._sock.close() self.receive_side.closed = True - broker.stop_receive(self) def _accept_client(self, sock): sock.setblocking(True)