fix kill signal
This commit is contained in:
parent
43ac20cc38
commit
6e9e512ccc
@ -6,6 +6,7 @@ import tempfile
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import openvpn_api
|
import openvpn_api
|
||||||
|
import signal
|
||||||
|
|
||||||
|
|
||||||
def generate_config(in_fp, cfg):
|
def generate_config(in_fp, cfg):
|
||||||
@ -94,7 +95,7 @@ class Openvpn:
|
|||||||
async def stop(self):
|
async def stop(self):
|
||||||
if self.status == RUNNING:
|
if self.status == RUNNING:
|
||||||
try:
|
try:
|
||||||
os.kill(self.PID)
|
os.kill(self.PID, signal.SIGKILL)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
print("kill failed:", err)
|
print("kill failed:", err)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user