diff --git a/sources/python/main.py b/sources/python/main.py index 7d9f1bc..87556f0 100644 --- a/sources/python/main.py +++ b/sources/python/main.py @@ -416,8 +416,8 @@ def start_debug(): break time.sleep(1) else: - print(f"Port {port} still in use — killing...") - run(f"fuser -k {port}/tcp 2>/dev/null", timeout=5) + print(f"Port {port} still in use — force killing...") + run(f"ss -K 'sport = :{port}' 2>/dev/null; kill -9 $(ss -tlnp 'sport = :{port}' | grep -oP 'pid=\\K[0-9]+') 2>/dev/null", timeout=5) time.sleep(2) print(f"Tap proxy :{port} → {backend}") print(f"Log: {logdir}/tap-*.log")