summaryrefslogtreecommitdiff
path: root/src/leap/base/network.py
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2012-10-12 14:10:13 -0400
committerantialias <antialias@leap.se>2012-10-12 14:10:13 -0400
commitf38e0eaf6aa23d06e7418bbb88a639f67888dc17 (patch)
tree41ced14f0aaa7d6cc6fc74cd7aaf32e331e6641a /src/leap/base/network.py
parentdca30766421cc692726c61fe2d502ae263e6121b (diff)
ping_gateway now uses the provider gateway defined in config file.
Diffstat (limited to 'src/leap/base/network.py')
-rw-r--r--src/leap/base/network.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/base/network.py b/src/leap/base/network.py
index e90139c4..3891b00a 100644
--- a/src/leap/base/network.py
+++ b/src/leap/base/network.py
@@ -3,6 +3,7 @@ from __future__ import (print_function)
import logging
import threading
+from leap.eip.config import get_eip_gateway
from leap.base.checks import LeapNetworkChecker
from leap.base.constants import ROUTE_CHECK_INTERVAL
from leap.base.exceptions import TunnelNotDefaultRouteError
@@ -29,7 +30,8 @@ class NetworkCheckerThread(object):
# XXX get provider_gateway and pass it to checker
# see in eip.config for function
# #718
- self.checker = LeapNetworkChecker()
+ self.checker = LeapNetworkChecker(
+ provider_gw = get_eip_gateway())
def start(self):
self.process_handle = self._launch_recurrent_network_checks(
@@ -55,6 +57,8 @@ class NetworkCheckerThread(object):
break
except TunnelNotDefaultRouteError:
# XXX ??? why do we sleep here???
+ # aa: If the openvpn isn't up and running yet,
+ # let's give it a moment to breath.
sleep(1)
fail_observer_dict = dict(((