From 100848992f96f8edd32433dd8f5efc7dc1230079 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 19 May 2014 11:11:31 -0500 Subject: do not tear fw down during restarts --- src/leap/bitmask/backend.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/leap/bitmask/backend.py') diff --git a/src/leap/bitmask/backend.py b/src/leap/bitmask/backend.py index 0ab7040b..d6d5004f 100644 --- a/src/leap/bitmask/backend.py +++ b/src/leap/bitmask/backend.py @@ -390,19 +390,19 @@ class EIP(object): # TODO: are we connected here? signaler.signal(signaler.EIP_CONNECTED) - def _do_stop(self, shutdown=False): + def _do_stop(self, shutdown=False, restart=False): """ Stop the service. This is run in a thread to avoid blocking. """ - self._vpn.terminate(shutdown) + self._vpn.terminate(shutdown, restart) if IS_LINUX: self._wait_for_firewall_down() - def stop(self, shutdown=False): + def stop(self, shutdown=False, restart=False): """ Stop the service. """ - return threads.deferToThread(self._do_stop, shutdown) + return threads.deferToThread(self._do_stop, shutdown, restart) def _wait_for_firewall_down(self): """ @@ -1460,14 +1460,17 @@ class Backend(object): """ self._call_queue.put(("eip", "start", None)) - def eip_stop(self, shutdown=False): + def eip_stop(self, shutdown=False, restart=False): """ Stop the EIP service. - :param shutdown: + :param shutdown: whether this is the final shutdown. :type shutdown: bool + + :param restart: whether this is part of a restart. + :type restart: bool """ - self._call_queue.put(("eip", "stop", None, shutdown)) + self._call_queue.put(("eip", "stop", None, shutdown, restart)) def eip_terminate(self): """ -- cgit v1.2.3