Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ func startWebServer(
}

func waitForServerShutdown(httpServer *http.Server, closableComponents *data.ClosableComponentsHandler) {
quit := make(chan os.Signal)
quit := make(chan os.Signal, 1)
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix! Using a buffered channel with capacity 1 prevents potential signal loss. The Go documentation recommends buffered channels for signal.Notify to ensure signals are not dropped if the receiver is not immediately ready.

Suggested change
quit := make(chan os.Signal, 1)
quit := make(chan os.Signal, 1) // Buffered channel with capacity 1 to prevent signal loss

Copilot uses AI. Check for mistakes.
signal.Notify(quit, os.Interrupt, os.Kill)
<-quit

Expand Down