cleaning pids after stopping the processes in openvpn.py
This commit is contained in:
parent
bed267a00b
commit
cb81643d5f
@ -159,10 +159,10 @@ class Openvpn:
|
|||||||
os.kill(pid, signal.SIGINT)
|
os.kill(pid, signal.SIGINT)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
print("kill failed:", err)
|
print("kill failed:", err)
|
||||||
|
|
||||||
self.status = IDLE
|
self.status = IDLE
|
||||||
for task in self.run_task:
|
for task in self.run_task:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
|
self.pids = []
|
||||||
self.run_task = []
|
self.run_task = []
|
||||||
try:
|
try:
|
||||||
os.remove(self.log_fp)
|
os.remove(self.log_fp)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user