-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.
Description
Problem
When a client request future is dropped/cancelled mid-send (e.g., partial body),
hyper-util sends FIN via poll_shutdown(). This tells the server "I'm done sending"
rather than "abort/discard."
Why RST would be better
- FIN + truncated body can cause server to wait for remaining data (timeout)
- Server might attempt to process incomplete request
- RST semantics ("abort") match the intent of cancellation
Current behavior
- Request future dropped
- Connection detects cancellation via
poll_canceled() poll_shutdown()called → FIN sent- Server receives incomplete request + graceful close
Suggested behavior
Option to send RST instead of FIN when a request is cancelled mid-flight.
Could be a pool config option like rst_on_cancel(true).
Workaround
Currently requires setting SO_LINGER=0 on the socket in a custom connector somehow just before connection is dropped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.