mirror of
https://github.com/fosrl/newt.git
synced 2026-03-03 01:06:44 +00:00
Exit well
This commit is contained in:
7
main.go
7
main.go
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user