diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-06-28 02:34:09 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-06-29 00:32:21 +0200 |
commit | 94d339ca4db68c0788f8ae768d69b16c1e80d676 (patch) | |
tree | 78d529c8185eb81c594fafa9c9eb7396ef33a735 /src/leap/bitmask/vpn/process.py | |
parent | c15e59940b15d6fd4128809287882eb0386f783f (diff) |
[feat] restart openvpn automatically
Right now we are trying to restart openvpn every 2 seconds, for ever (or
until the user turns down the VPN). Maybe we can be more smart making
the retries longer with time.
- Resolves: #8049
Diffstat (limited to 'src/leap/bitmask/vpn/process.py')
-rw-r--r-- | src/leap/bitmask/vpn/process.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py index 170df446..5b8bc1b7 100644 --- a/src/leap/bitmask/vpn/process.py +++ b/src/leap/bitmask/vpn/process.py @@ -96,7 +96,7 @@ class _VPNProcess(protocol.ProcessProtocol, _management.VPNManagement): self._status = _status.VPNStatus() self.set_watcher(self._status) - self.restarting = False + self.restarting = True self._remotes = remotes @property @@ -171,7 +171,7 @@ class _VPNProcess(protocol.ProcessProtocol, _management.VPNManagement): self.log.debug('processEnded, status %d' % (exit_code,)) if self.restarting: self.log.debug('Restarting VPN process') - reactor.callLater(2, self._restartfun) + self._restartfun() # polling |