From cd78d9d552977e8f8fb12b6a2ff56fda9c37bf35 Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 7 Dec 2012 05:32:50 +0900 Subject: only remove management socket when shutting down Closes #1090 --- src/leap/eip/openvpnconnection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/leap/eip') 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): """ -- cgit v1.2.3