summaryrefslogtreecommitdiff
path: root/src/leap/gui/mainwindow.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-07-24 13:50:42 -0300
committerTomás Touceda <chiiph@leap.se>2013-07-24 13:50:42 -0300
commit59f97e46c85e7727aa9b5e87da5c419d428a00c8 (patch)
tree3f606c1be4960b08ef3f2df2f661030a58c9e15a /src/leap/gui/mainwindow.py
parentd56790c4cddab8768e14a83a3c9fcb15bda1dee5 (diff)
Logout at close if the user logged in
Diffstat (limited to 'src/leap/gui/mainwindow.py')
-rw-r--r--src/leap/gui/mainwindow.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 6fe3e72d..8a729bae 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -1322,6 +1322,11 @@ class MainWindow(QtGui.QMainWindow):
"""
logger.debug('About to quit, doing cleanup...')
+ if self._srp_auth is not None:
+ if self._srp_auth.get_session_id() is not None or \
+ self._srp_auth.get_token() is not None:
+ self._srp_auth.logout()
+
logger.debug('Cleaning pidfiles')
self._cleanup_pidfiles()