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 4a95c8f commit c96e2e1Copy full SHA for c96e2e1
cookbook/graceful-shutdown/server.go
@@ -29,7 +29,7 @@ func main() {
29
30
// Wait for interrupt signal to gracefully shutdown the server with
31
// a timeout of 10 seconds.
32
- quit := make(chan os.Signal)
+ quit := make(chan os.Signal, 1)
33
signal.Notify(quit, os.Interrupt)
34
<-quit
35
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
0 commit comments