From 2d942fbac75c814be369405f45fb1121d99c7350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 27 Feb 2015 17:30:34 +0100 Subject: [PATCH] More minor fixes --- actors/src/UDSActorUser.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/actors/src/UDSActorUser.py b/actors/src/UDSActorUser.py index 66347c06c..a38f2b52f 100644 --- a/actors/src/UDSActorUser.py +++ b/actors/src/UDSActorUser.py @@ -258,18 +258,22 @@ class UDSSystemTray(QtGui.QSystemTrayIcon): def quit(self): logger.debug('Quit invoked') - if self.stopped is True: - return - self.stopped = True + if self.stopped is False: + self.stopped = True + try: + # If we close Client, send Logoff to Broker + self.ipc.sendLogout(operations.getCurrentUser()) + self.timer.stop() + self.ipc.stop() + except Exception: + # May we have lost connection with server, simply exit in that case + pass + try: - # If we close Client, send Logoff to Broker - self.ipc.sendLogout(operations.getCurrentUser()) - self.timer.stop() - self.ipc.stop() - operations.loggoff() + operations.loggoff() # Invoke log off except Exception: - # May we have lost connection with server, simply exit in that case pass + self.app.quit() if __name__ == '__main__':