From 32300bc16c3c16809d9be0326125e5f6caac122e Mon Sep 17 00:00:00 2001 From: Catherine Date: Sat, 30 May 2026 15:23:50 +0000 Subject: [PATCH] Fix goroutine leak in `POST` webhook handler. In Go, unsized channels are unbuffered and require the sender and the receiver to rendezvous, or the sender blocks. If the receiver never listens the sender cannot know this. In Rust, unsized channels have an unbounded buffer and sending into a channel with no receiver returns an error. I got confused by the difference in semantics. V12-Ref: F-77239 --- src/pages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages.go b/src/pages.go index 7d1fb67..05d89fc 100644 --- a/src/pages.go +++ b/src/pages.go @@ -868,7 +868,7 @@ func postPage(w http.ResponseWriter, r *http.Request) error { return nil } - resultChan := make(chan UpdateResult) + resultChan := make(chan UpdateResult, 1) go func(ctx context.Context) { ctx, cancel := context.WithTimeout(ctx, time.Duration(config.Limits.UpdateTimeout)) defer cancel()