summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-03 20:41:31 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-03 20:41:31 -0300
commit90a731e8a5f7e8b44b5ad76262ff01fb98f8e18c (patch)
treefaf53f01cbe4e76eb73d2861970e80ea655c4f7e /src/leap/bitmask/gui
parentb95bbc415086c4ebdf9d0a8adc8b64a9fe3bf8b1 (diff)
Properly stop the smtp daemon
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 79ff68c4..84f09fd9 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -312,6 +312,7 @@ class MainWindow(QtGui.QMainWindow):
self._soledad_ready = False
self._keymanager = None
self._smtp_service = None
+ self._smtp_port = None
self._imap_service = None
self._login_defer = None
@@ -1104,7 +1105,7 @@ class MainWindow(QtGui.QMainWindow):
# the specific default.
from leap.mail.smtp import setup_smtp_relay
- self._smtp_service = setup_smtp_relay(
+ self._smtp_service, self._smtp_port = setup_smtp_relay(
port=2013,
keymanager=self._keymanager,
smtp_host=host,
@@ -1124,6 +1125,7 @@ class MainWindow(QtGui.QMainWindow):
# but in the imap case we are just stopping the fetcher.
if self._smtp_service is not None:
logger.debug('Stopping smtp service.')
+ self._smtp_port.stopListening()
self._smtp_service.doStop()
###################################################################