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

Gracefully handle accept errors in serve #2400

Merged
merged 2 commits into from Dec 2, 2023

Conversation

davidpdrsn
Copy link
Member

As pointed out in #2388 serve doesn't handle errors when accepting a new connection.

This copies the approach that hyper 0.14 used https://github.com/hyperium/hyper/blob/v0.14.27/src/server/tcp.rs#L226-L248.

axum/src/serve.rs Outdated Show resolved Hide resolved
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
@davidpdrsn davidpdrsn enabled auto-merge (squash) December 2, 2023 18:01
@davidpdrsn davidpdrsn merged commit ef56636 into main Dec 2, 2023
18 checks passed
@davidpdrsn davidpdrsn deleted the david/sleep-on-accept-error branch December 2, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants