summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/service
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-09-14 23:19:58 -0400
committerRuben Pollan <meskio@sindominio.net>2015-09-16 02:00:27 +0200
commit0a03c0a014b1874114eabb855705ca79f09d1982 (patch)
treeea10d37ba6b21a91636daf96163c79f62ac73179 /src/leap/mail/imap/service
parentcf7906eda74ad73d026f1a2a29b3581d72abb473 (diff)
[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
Diffstat (limited to 'src/leap/mail/imap/service')
-rw-r--r--src/leap/mail/imap/service/imap.py6
1 files changed, 3 insertions, 3 deletions
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))