[CHA-4943] Retry once on stale keep-alive sockets - #80
Open
itsmeadi wants to merge 1 commit into
Open
Conversation
…4943] Faraday/net_http_persistent reuses dead sockets and surfaces SSL EOF, RST, or ReadTimeout-on-closed-socket as TransportError. Match Go net/http by retrying unused idle connections once with no backoff, including POST. DNS failures and real read timeouts are not retried. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Summary
Follow-up to #78 (
idle_timeout55→25). PrizePicks still hitGetStreamRuby::TransportErroron reused keep-alive sockets (SSL_readEOF,Connection reset by peer,Net::ReadTimeouton a closedTCPSocket). Faraday/net_http_persistentdoes not retry those; Gonet/httpdoes for unused idle connections.Retry the request once, with no backoff, when the failure looks like a dead pooled socket. Applies to POST as well as GET. DNS failures and real read timeouts are not retried. The opt-in
retry_config:policy is unchanged.Previous PR
Checklist
./docs) has been updatedNotes for review
Client#requestbefore the retry loop).Made with Cursor