Skip to content

Commit ada4ef6

Browse files
committed
Fix 'misuse of unbuffered os.Signal channel ...' error.
1 parent eef33fc commit ada4ef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/chirpstack-gateway-bridge/cmd/root_run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func run(cmd *cobra.Command, args []string) error {
4242
}
4343
}
4444

45-
sigChan := make(chan os.Signal)
45+
sigChan := make(chan os.Signal, 1)
4646
signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
4747
log.WithField("signal", <-sigChan).Info("signal received")
4848
log.Warning("shutting down server")

0 commit comments

Comments
 (0)