diff options
author | kali <kali@leap.se> | 2013-01-16 00:59:54 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-01-16 00:59:54 +0900 |
commit | 9c260efd6f9821f5d97cc426f501203bfc8a1fde (patch) | |
tree | 3a0a31077cb6cb1e4ec1bbcfc2cd08e6b08adf4b /src/leap/eip/eipconnection.py | |
parent | f90f9df1d09e12ba64e9401530684d5a36220ad3 (diff) | |
parent | bf39c45eddc62733fdb72b4f46cdb81ec649cb30 (diff) |
Merge branch 'feature/openvpn_logs_mgmt_interface' into develop
Diffstat (limited to 'src/leap/eip/eipconnection.py')
-rw-r--r-- | src/leap/eip/eipconnection.py | 6 |
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') |