Skip to content

Commit 4c25083

Browse files
Define length limits on signal channels (#165)
1 parent 293c00f commit 4c25083

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/runaceserver/signals.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func signalHandler(shutdownFunc func()) chan int {
3232
control := make(chan int)
3333
// Use separate channels for the signals, to avoid SIGCHLD signals swamping
3434
// the buffer, and preventing other signals.
35-
stopSignals := make(chan os.Signal)
36-
reapSignals := make(chan os.Signal)
35+
stopSignals := make(chan os.Signal, 2)
36+
reapSignals := make(chan os.Signal, 2)
3737
signal.Notify(stopSignals, syscall.SIGTERM, syscall.SIGINT)
3838
go func() {
3939
for {

0 commit comments

Comments
 (0)