File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,9 @@ func (cmd *cmdLogs) Execute(args []string) error {
107
107
// Needed because signal.NotifyContext is Go 1.16+
108
108
func notifyContext (parent context.Context , signals ... os.Signal ) context.Context {
109
109
ctx , cancel := context .WithCancel (parent )
110
- // This channel doesn't really need to be buffered here, but it shuts up
111
- // "go vet" ( and other places in Pebble use a buffer size of 2, so be
112
- // consistent) .
110
+ // Need a buffered channel in case the signal arrives between the
111
+ // signal.Notify call and the goroutine waiting on the channel. In
112
+ // cmd_run.go Pebble uses a buffer size of 2, so be consistent.
113
113
ch := make (chan os.Signal , 2 )
114
114
signal .Notify (ch , signals ... )
115
115
go func () {
You can’t perform that action at this time.
0 commit comments