Exit well

This commit is contained in:
Owen
2025-07-24 20:46:33 -07:00
parent 008be54c55
commit 56377ec87e
3 changed files with 21 additions and 8 deletions

View File

@@ -798,10 +798,13 @@ persistent_keepalive_interval=5`, fixKey(privateKey.String()), fixKey(wgData.Pub
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
<-sigCh
dev.Close()
// Close clients first (including WGTester)
closeClients()
if dev != nil {
dev.Close()
}
if pm != nil {
pm.Stop()
}