Skip to content

Commit 499a1f9

Browse files
authored
Merge pull request kubernetes#104489 from liggitt/signal-buffer
Fix buffered signal channel go vet error
2 parents 7652353 + 322bc82 commit 499a1f9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/e2e_node/runner/remote/run_remote.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func main() {
205205
// process and all its children, we ignore it here, while our children ssh connections
206206
// are stopped. This allows us to gather artifacts and print out test state before
207207
// being killed.
208-
c := make(chan os.Signal)
208+
c := make(chan os.Signal, 2)
209209
signal.Notify(c, os.Interrupt)
210210
go func() {
211211
<-c

test/images/agnhost/nettest/nettest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func main(cmd *cobra.Command, args []string) {
216216
}
217217

218218
if delayShutdown > 0 {
219-
termCh := make(chan os.Signal)
219+
termCh := make(chan os.Signal, 1)
220220
signal.Notify(termCh, syscall.SIGTERM)
221221
go func() {
222222
<-termCh

test/images/agnhost/pause/pause.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var CmdPause = &cobra.Command{
3636

3737
func pause(cmd *cobra.Command, args []string) {
3838
fmt.Println("Paused")
39-
sigCh := make(chan os.Signal)
39+
sigCh := make(chan os.Signal, 1)
4040
done := make(chan int, 1)
4141
signal.Notify(sigCh, syscall.SIGINT)
4242
signal.Notify(sigCh, syscall.SIGTERM)

0 commit comments

Comments
 (0)