From 59f97e46c85e7727aa9b5e87da5c419d428a00c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Wed, 24 Jul 2013 13:50:42 -0300 Subject: Logout at close if the user logged in --- src/leap/gui/mainwindow.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/leap') 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() -- cgit v1.2.3