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
This commit is contained in:
Catherine
2026-05-30 15:23:50 +00:00
parent 3fe45f0c98
commit 32300bc16c
+1 -1
View File
@@ -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()