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
24 changes: 24 additions & 0 deletions internal/handler/agentic_probe_batch_15.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package handler

import (
"context"
"net/http"
"time"

"golang.org/x/sync/errgroup"
)

func AgenticProbeBatch15(w http.ResponseWriter, r *http.Request) error {
g, _ := errgroup.WithContext(r.Context())
for i := 0; i < 3; i++ {
g.Go(func() error {
select {
case <-time.After(150 * time.Millisecond):
return nil
case <-context.Background().Done():

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[agentic-review] [MEDIUM / HIGH] Prefer request-scoped context over context.Background() in request paths.

return nil
}
})
}
return g.Wait()
}