From 6246baa6758accd6632714989fc04e406dcff42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Bokros?= Date: Thu, 25 Jan 2018 15:24:01 +0100 Subject: [PATCH] Move ioloop init to module level --- src/event_handlers/messaging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/event_handlers/messaging.py b/src/event_handlers/messaging.py index 2aea906..fd21c92 100644 --- a/src/event_handlers/messaging.py +++ b/src/event_handlers/messaging.py @@ -6,10 +6,11 @@ from zmq.eventloop.zmqstream import ZMQStream from config import PUBLISHER_PORT, RECEIVER_PORT +ioloop.install() + class Messaging: def __init__(self): - ioloop.install() self._zmq_context = zmq.Context.instance() self._zmq_sub_socket = self._zmq_context.socket(zmq.SUB) self._zmq_sub_socket.connect('tcp://localhost:{}'.format(PUBLISHER_PORT))