Skip to content

Reply with {error, closed} instead of {error, illegal_state} on calls… - #933

Closed
kpy3 wants to merge 1 commit into
benoitc:masterfrom
kpy3:master
Closed

Reply with {error, closed} instead of {error, illegal_state} on calls…#933
kpy3 wants to merge 1 commit into
benoitc:masterfrom
kpy3:master

Conversation

@kpy3

@kpy3 kpy3 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

… to closed connection

This fixes #932

@kpy3
kpy3 force-pushed the master branch 3 times, most recently from 5d753a5 to b1c9ece Compare August 18, 2026 07:04
@kpy3

kpy3 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

5 days no new invalid state so far

@benoitc

benoitc commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Merged as part of #936, which carries your commit as-is plus a follow-up that scopes the reply to calls with no handler. The catch-all placed ahead of handle_common also shadowed response_headers, get_location, get_protocol, checkin_info and close_socket in the closed state, which broke hackney:location/1. Replying from handle_common's fallback keyed on the state keeps those answering and drops the need for the hackney_pool workaround. Thanks for the fix and the diagnosis.

@benoitc benoitc closed this Sep 3, 2026
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.

hackney_conn:request/5 can return {error, invalid_state} for a connection that was successfully checked out, if the peer has already closed it

2 participants