diff options
author | kali <kali@leap.se> | 2012-12-07 05:32:50 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-12-07 05:32:50 +0900 |
commit | cd78d9d552977e8f8fb12b6a2ff56fda9c37bf35 (patch) | |
tree | 29862f96335de59638de4963b8bb7d8003dec86f | |
parent | c963fcf443fec18c46aa40801436533f60ebbe57 (diff) |
only remove management socket when shutting down
Closes #1090
-rw-r--r-- | src/leap/baseapp/leap_app.py | 2 | ||||
-rw-r--r-- | src/leap/eip/openvpnconnection.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py index 4b63dd2f..e41cff40 100644 --- a/src/leap/baseapp/leap_app.py +++ b/src/leap/baseapp/leap_app.py @@ -148,6 +148,6 @@ class MainWindowMixin(object): # in conductor # XXX send signal instead? logger.info('Shutting down') - self.conductor.cleanup() + self.conductor.cleanup(shutdown=True) logger.info('Exiting. Bye.') QtGui.qApp.quit() diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py index 859378c0..07bc628a 100644 --- a/src/leap/eip/openvpnconnection.py +++ b/src/leap/eip/openvpnconnection.py @@ -176,7 +176,7 @@ to be triggered for each one of them. logger.debug('no openvpn instance found.') - def cleanup(self): + def cleanup(self, shutdown=False): """ terminates openvpn child subprocess """ @@ -201,7 +201,8 @@ to be triggered for each one of them. 'cannot terminate subprocess! Retcode %s' '(We might have left openvpn running)' % RETCODE) - self.cleanup_tempfiles() + if shutdown: + self.cleanup_tempfiles() def cleanup_tempfiles(self): """ |