1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

Fix force quit using SIGINT

Only the outside function call is executed in a new goroutine when
invoking 'go'. Oops. Force quits (2 SIGINTs) now work again.
This commit is contained in:
Matthew Holt 2017-07-31 17:43:37 -06:00
parent e7f08bff38
commit 65bc696b0c
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -42,7 +42,9 @@ func trapSignalsCrossPlatform() {
os.Remove(PidFile)
}
go os.Exit(executeShutdownCallbacks("SIGINT"))
go func() {
os.Exit(executeShutdownCallbacks("SIGINT"))
}()
}
}()
}