summaryrefslogtreecommitdiff
path: root/src/leap/baseapp
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2012-09-28 18:16:47 -0400
committerantialias <antialias@leap.se>2012-09-28 18:16:47 -0400
commit58344bb28c1c0f25ed37624ff487cc8f24821d52 (patch)
tree873a8225862e20124ee69af7c509772dab952674 /src/leap/baseapp
parent202345940e12d4633c5d46d5ed21c3a433573d48 (diff)
Functionality to shutdown network checker when openvpn is stopped.
But thread not being successfully killed.
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r--src/leap/baseapp/eip.py2
-rw-r--r--src/leap/baseapp/network.py7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py
index b0e14be7..ad074abc 100644
--- a/src/leap/baseapp/eip.py
+++ b/src/leap/baseapp/eip.py
@@ -224,9 +224,11 @@ class EIPConductorAppMixin(object):
# we could bring Timer Init to this Mixin
# or to its own Mixin.
self.timer.start(constants.TIMER_MILLISECONDS)
+ self.network_checker.start()
return
if self.eip_service_started is True:
+ self.network_checker.stop()
self.conductor.disconnect()
if self.debugmode:
self.startStopButton.setText('&Connect')
diff --git a/src/leap/baseapp/network.py b/src/leap/baseapp/network.py
index 42a42fcd..75690cc9 100644
--- a/src/leap/baseapp/network.py
+++ b/src/leap/baseapp/network.py
@@ -36,7 +36,7 @@ class NetworkCheckerAppMixin(object):
errq = self.conductor.error_queue
while errq.qsize() != 0:
- logger.debug('%s errors left in conductor queue', errq.qsize())
+ logger.debug('%s errors left in network queue', errq.qsize())
# we get exception and original traceback from queue
error, tb = errq.get()
@@ -44,7 +44,7 @@ class NetworkCheckerAppMixin(object):
logger.error('%s: %s', error.__class__.__name__, error.message)
if issubclass(error.__class__, eip_exceptions.EIPClientError):
- self.handle_eip_error(error)
+ self.handle_network_error(error)
else:
# deprecated form of raising exception.
@@ -53,4 +53,5 @@ class NetworkCheckerAppMixin(object):
if error.failfirst is True:
break
-
+ def handle_network_error(self, error):
+ pass