[stream-refactor] fix unix.Listener construction
This commit is contained in:
parent
1fb3852fa6
commit
26b6333787
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue