Skip to content

Commit c7fe1fb

Browse files
committed
Improve comment
Signed-off-by: Luke Addison <lukeaddison785@gmail.com>
1 parent f73f60c commit c7fe1fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ func setupSignalHandler(waitPeriod time.Duration) context.Context {
596596
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
597597
go func() {
598598
<-c
599-
// Cancel the context once the wait period expires
599+
// Cancel the context once the wait period expires but avoid blocking if
600+
// a second signal is received
600601
go func() {
601602
<-time.After(waitPeriod)
602603
cancel()

0 commit comments

Comments
 (0)