diff --git a/ansible_mitogen/process.py b/ansible_mitogen/process.py index e4e61e8b..251acf30 100644 --- a/ansible_mitogen/process.py +++ b/ansible_mitogen/process.py @@ -308,7 +308,7 @@ class MuxProcess(object): self._setup_responder(self.router.responder) mitogen.core.listen(self.broker, 'shutdown', self.on_broker_shutdown) mitogen.core.listen(self.broker, 'exit', self.on_broker_exit) - self.listener = mitogen.unix.Listener( + self.listener = mitogen.unix.Listener.build_stream( router=self.router, path=self.unix_listener_path, backlog=C.DEFAULT_FORKS, diff --git a/mitogen/unix.py b/mitogen/unix.py index f7e56435..3434fab2 100644 --- a/mitogen/unix.py +++ b/mitogen/unix.py @@ -118,9 +118,9 @@ class Listener(mitogen.core.Protocol): raise def on_shutdown(self, broker): - broker.stop_receive(self) + broker.stop_receive(self.stream) self._unlink_socket() - self.receive_side.close() + self.stream.receive_side.close() def on_accept_client(self, sock): sock.setblocking(True)