Skip to content

Commit

Permalink
Improve comment
Browse files Browse the repository at this point in the history
Signed-off-by: Luke Addison <lukeaddison785@gmail.com>
  • Loading branch information
dippynark committed Nov 23, 2023
1 parent f73f60c commit c7fe1fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ func setupSignalHandler(waitPeriod time.Duration) context.Context {
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
// Cancel the context once the wait period expires
// Cancel the context once the wait period expires but avoid blocking if
// a second signal is received
go func() {
<-time.After(waitPeriod)
cancel()
Expand Down

0 comments on commit c7fe1fb

Please sign in to comment.