mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-21 15:49:37 +08:00
main_windows: Catch more exit events
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"git.zx2c4.com/wireguard-go/tun"
|
||||
)
|
||||
@@ -71,6 +72,8 @@ func main() {
|
||||
// wait for program to terminate
|
||||
|
||||
signal.Notify(term, os.Interrupt)
|
||||
signal.Notify(term, os.Kill)
|
||||
signal.Notify(term, syscall.SIGTERM)
|
||||
|
||||
select {
|
||||
case <-term:
|
||||
|
Reference in New Issue
Block a user