Skip to content

docs(client): document Drop behavior for Connection types#4064

Merged
seanmonstar merged 1 commit intohyperium:masterfrom
lihan3238:fix-3192
May 8, 2026
Merged

docs(client): document Drop behavior for Connection types#4064
seanmonstar merged 1 commit intohyperium:masterfrom
lihan3238:fix-3192

Conversation

@lihan3238
Copy link
Copy Markdown
Contributor

@lihan3238 lihan3238 commented May 8, 2026

Summary

Adds documentation for the Drop behavior of Connection types in both http1 and http2 client connection modules.

Currently, the docs explain that Connection should be polled, but do not mention what happens if it is dropped. This PR clarifies that dropping the Connection closes the underlying IO resource and interrupts in-flight requests.

Closes #3192

Changes

  • Added Drop behavior section to http1::Connection doc comments
  • Added Drop behavior section to http2::Connection doc comments

Explain what happens when Connection is dropped: the underlying IO
resource is closed and in-flight requests are interrupted. Suggest
polling to completion for graceful shutdown.

Closes hyperium#3192
@seanmonstar seanmonstar merged commit e9be344 into hyperium:master May 8, 2026
22 checks passed
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.

Document Drop behavior for Connection types

3 participants