mirror of
https://git.zx2c4.com/wireguard-go
synced 2024-11-15 01:05:15 +01:00
main_windows: Catch more exit events
This commit is contained in:
parent
ea59177f1c
commit
52aa00f3ba
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user