Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(conn/auto): hang on graceful shutdown when reading version #101

Merged
merged 1 commit into from Feb 26, 2024

Conversation

dswij
Copy link
Member

@dswij dswij commented Feb 26, 2024

fixes hyperium/hyper#3576

This PR fixes graceful shutdown hanging when it's in the ReadVersion state due to open IOs.

For example, now in cargo run -p example-graceful-shutdown with nc

TRACE axum::serve: connection 127.0.0.1:52671 accepted
^C
TRACE axum::serve: received graceful shutdown signal. Telling tasks to shutdown
TRACE axum::serve: signal received in task, starting graceful shutdown
TRACE axum::serve: signal received, not accepting new connections
TRACE axum::serve: failed to serve connection: Cancelled ## < now shows as cancelled instead
TRACE axum::serve: connection 127.0.0.1:52671 closed
TRACE axum::serve: waiting for 0 task(s) to finish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants