Use ZMQ installer for master

This commit is contained in:
Bo Maryniuk 2018-02-13 14:08:33 +01:00
parent 453e83210a
commit cbb26dcb28

View File

@ -28,6 +28,7 @@ except ImportError:
# pylint: disable=import-error,no-name-in-module,redefined-builtin
import salt.ext.six as six
from salt.ext.six.moves import range
from salt.utils.zeromq import zmq, ZMQDefaultLoop, install_zmq, zmq_version_info
# pylint: enable=import-error,no-name-in-module,redefined-builtin
try:
@ -858,9 +859,8 @@ class MWorker(SignalHandlingMultiprocessingProcess):
Bind to the local port
'''
# using ZMQIOLoop since we *might* need zmq in there
if HAS_ZMQ and not TORNADO_50:
zmq.eventloop.ioloop.install()
self.io_loop = LOOP_CLASS()
install_zmq()
self.io_loop = ZMQDefaultLoop()
self.io_loop.make_current()
for req_channel in self.req_channels:
req_channel.post_fork(self._handle_payload, io_loop=self.io_loop) # TODO: cleaner? Maybe lazily?