We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c96e2e1 commit 623577eCopy full SHA for 623577e
cookbook/graceful-shutdown/server.go
@@ -27,8 +27,8 @@ func main() {
27
}
28
}()
29
30
- // Wait for interrupt signal to gracefully shutdown the server with
31
- // a timeout of 10 seconds.
+ // Wait for interrupt signal to gracefully shutdown the server with a timeout of 10 seconds.
+ // Use a buffered channel to avoid missing signals as recommended for signal.Notify
32
quit := make(chan os.Signal, 1)
33
signal.Notify(quit, os.Interrupt)
34
<-quit
0 commit comments