summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-06-28 14:53:42 +0200
committerRuben Pollan <meskio@sindominio.net>2017-06-29 00:32:22 +0200
commitb62d0e2390bc1cc6bd51e97801b2b8ef853b1a44 (patch)
tree6ce3eff5c23f43a2f403f93a636adea0ec86f3f5
parent94d339ca4db68c0788f8ae768d69b16c1e80d676 (diff)
[feat] return starting status for a restarting VPN
In case of the openvpn process being off, if we are restarting it we'll report the status as 'starting'.
-rw-r--r--src/leap/bitmask/vpn/process.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py
index 5b8bc1b7..daf3576b 100644
--- a/src/leap/bitmask/vpn/process.py
+++ b/src/leap/bitmask/vpn/process.py
@@ -101,7 +101,10 @@ class _VPNProcess(protocol.ProcessProtocol, _management.VPNManagement):
@property
def status(self):
- return self._status.status
+ status = self._status.status
+ if status['status'] == 'off' and self.restarting:
+ status['status'] = 'starting'
+ return status
@property
def traffic_status(self):