summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/eip
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-05-30 11:26:37 -0300
committerTomás Touceda <chiiph@leap.se>2014-05-30 11:26:37 -0300
commit0b1e346b0c3c5306bed639f955847bb50bdc1650 (patch)
tree327618c2a43cf0015b8f5e07fed8025aa620ac52 /src/leap/bitmask/services/eip
parent014b10ffae521f3abbf7d38c6700bbacf2712134 (diff)
parente723927a9a5a1b6e40553499e9d5148df10fcc46 (diff)
Merge remote-tracking branch 'refs/remotes/ivan/bug/do-nothing-if-eip-not-started' into develop
Diffstat (limited to 'src/leap/bitmask/services/eip')
-rw-r--r--src/leap/bitmask/services/eip/vpnprocess.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/bitmask/services/eip/vpnprocess.py b/src/leap/bitmask/services/eip/vpnprocess.py
index 098619be..1de4a851 100644
--- a/src/leap/bitmask/services/eip/vpnprocess.py
+++ b/src/leap/bitmask/services/eip/vpnprocess.py
@@ -317,13 +317,13 @@ class VPN(object):
from twisted.internet import reactor
self._stop_pollers()
- # We assume that the only valid stops are initiated
- # by an user action, not hard restarts
- self._user_stopped = not restart
- self._vpnproc.is_restart = restart
-
# First we try to be polite and send a SIGTERM...
- if self._vpnproc:
+ if self._vpnproc is not None:
+ # We assume that the only valid stops are initiated
+ # by an user action, not hard restarts
+ self._user_stopped = not restart
+ self._vpnproc.is_restart = restart
+
self._sentterm = True
self._vpnproc.terminate_openvpn(shutdown=shutdown)