summaryrefslogtreecommitdiff
path: root/src/leap/eip/eipconnection.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-16 00:58:22 +0900
committerkali <kali@leap.se>2013-01-16 00:58:22 +0900
commitbf39c45eddc62733fdb72b4f46cdb81ec649cb30 (patch)
tree3a0a31077cb6cb1e4ec1bbcfc2cd08e6b08adf4b /src/leap/eip/eipconnection.py
parent8139b39dedc3dc99d310d082f6edb10d2303a1ce (diff)
handle loss of tun iface
trigger only one dialog and disconnect. additional cleanup of log handling.
Diffstat (limited to 'src/leap/eip/eipconnection.py')
-rw-r--r--src/leap/eip/eipconnection.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/eip/eipconnection.py b/src/leap/eip/eipconnection.py
index 540e7558..20b45e36 100644
--- a/src/leap/eip/eipconnection.py
+++ b/src/leap/eip/eipconnection.py
@@ -27,6 +27,8 @@ class StatusMixIn(object):
# Should separate EIPConnectionStatus (self.status)
# from the OpenVPN state/status command and parsing.
+ ERR_CONNREFUSED = False
+
def connection_state(self):
"""
returns the current connection state
@@ -49,7 +51,9 @@ class StatusMixIn(object):
state = self.get_connection_state()
except eip_exceptions.ConnectionRefusedError:
# connection refused. might be not ready yet.
- logger.warning('connection refused')
+ if not self.ERR_CONNREFUSED:
+ logger.warning('connection refused')
+ self.ERR_CONNREFUSED = True
return
if not state:
#logger.debug('no state')