Skip to content

fix: classify a connection closed before a response as connection_reset - #1191

Open
alexluong wants to merge 1 commit into
mainfrom
fix/eof-connection-reset
Open

alexluong wants to merge 1 commit into
mainfrom
fix/eof-connection-reset

Conversation

@alexluong

@alexluong alexluong commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

When a receiver closes the connection after we send the request but before it responds, Go's HTTP client returns a bare EOF. ClassifyNetworkError only matches "connection reset" in the error text, so these attempts are recorded as the catch-all network_error, which reads like a failure on Outpost's side.

This shows up most with a forward proxy (DESTINATIONS_PROXY_URL). Inside a CONNECT tunnel, an upstream reset reaches Outpost as the proxy closing its side of the tunnel, so the client sees EOF. The same receiver behavior is recorded as connection_reset on a direct delivery and as network_error through the proxy.

ClassifyNetworkError now maps io.EOF and io.ErrUnexpectedEOF to connection_reset, whose documented meaning, "connection was dropped by the server", already covers a close before a response. Retries are unchanged: both codes are destination errors and nothing branches on either.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexluong
alexluong force-pushed the fix/eof-connection-reset branch from 1e6a32d to 42a4333 Compare November 4, 2026 15:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants