Skip to content

Handle HTTP/1 remote disconnects - #240

Merged
ioquatix merged 1 commit into
mainfrom
samuel/handle-client-disconnects
Aug 20, 2026
Merged

Handle HTTP/1 remote disconnects#240
ioquatix merged 1 commit into
mainfrom
samuel/handle-client-disconnects

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat Protocol::HTTP::RemoteError in the HTTP/1 server loop as a normal remote disconnect.
  • Log the disconnect at debug level and terminate the affected connection.
  • Close the response body with the original remote error.
  • Continue to propagate unrelated exceptions such as raw application EPIPE failures.

Depends on socketry/protocol-http1#58, which maps connection-level EPIPE and ECONNRESET failures to Protocol::HTTP::RemoteError and prevents connection reuse.

Testing

  • bundle exec bake test
  • bundle exec rubocop
  • bundle exec bake decode:index:coverage lib

@samuel-williams-shopify
samuel-williams-shopify force-pushed the samuel/handle-client-disconnects branch from 6f22433 to 9aae153 Compare August 19, 2026 22:30
@samuel-williams-shopify samuel-williams-shopify changed the title Handle HTTP/1 client disconnects during response writes Handle HTTP/1 remote disconnects Aug 19, 2026
@samuel-williams-shopify
samuel-williams-shopify force-pushed the samuel/handle-client-disconnects branch 2 times, most recently from 60eb05e to 42edf09 Compare August 19, 2026 23:53
@samuel-williams-shopify
samuel-williams-shopify force-pushed the samuel/handle-client-disconnects branch from 42edf09 to f8b8023 Compare August 19, 2026 23:59
@ioquatix
ioquatix merged commit 60c5249 into main Aug 20, 2026
34 of 40 checks passed
@ioquatix
ioquatix deleted the samuel/handle-client-disconnects branch August 20, 2026 00:02
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