From 0a03c0a014b1874114eabb855705ca79f09d1982 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 14 Sep 2015 23:19:58 -0400 Subject: [feat] use async events api in this way, we're using twisted reactor instead of having another thread with zmq's own copy of tornado ioloop. Resolves: #7274 --- src/leap/mail/imap/service/imap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/leap/mail/imap/service/imap.py') diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py index c3ae59a..cd31edf 100644 --- a/src/leap/mail/imap/service/imap.py +++ b/src/leap/mail/imap/service/imap.py @@ -28,7 +28,7 @@ from twisted.internet.protocol import ServerFactory from twisted.mail import imap4 from twisted.python import log -from leap.common.events import emit, catalog +from leap.common.events import emit_async, catalog from leap.common.check import leap_check from leap.mail.imap.account import IMAPAccount from leap.mail.imap.server import LEAPIMAPServer @@ -178,10 +178,10 @@ def run_service(store, **kwargs): reactor.listenTCP(manhole.MANHOLE_PORT, manhole_factory, interface="127.0.0.1") logger.debug("IMAP4 Server is RUNNING in port %s" % (port,)) - emit(catalog.IMAP_SERVICE_STARTED, str(port)) + emit_async(catalog.IMAP_SERVICE_STARTED, str(port)) # FIXME -- change service signature return tport, factory # not ok, signal error. - emit(catalog.IMAP_SERVICE_FAILED_TO_START, str(port)) + emit_async(catalog.IMAP_SERVICE_FAILED_TO_START, str(port)) -- cgit v1.2.3