Codex/GitHub allowlist and dial fallback#3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b694f149ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| select { | ||
| case results <- dialResult{address: address, conn: conn}: | ||
| case <-attemptCtx.Done(): |
There was a problem hiding this comment.
Close redundant successful fallback connections
When multiple dialResolvedTargets attempts succeed around the same time, each successful goroutine can enqueue its net.Conn into results, but the caller returns after the first success and never drains/cleans the remaining queued connections. In dual-stack or multi-A record cases this leaks upstream sockets per request until GC/fd pressure becomes significant, because the extra successful conns are not closed anywhere after being sent.
Useful? React with 👍 / 👎.
No description provided.