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

Add on_failed_upgrade callback to WebSocketUpgrade #1539

Merged
merged 3 commits into from Nov 18, 2022

Conversation

davidpdrsn
Copy link
Member

Previously if upgrading a connection to a WebSocket connection failed the background task would panic. There was no way to customize that so users that might wanna report the error was out of luck.

Panicking also wasn't great because users might abort on panics which would bring down the server.

Previously if upgrading a connection to a WebSocket connection failed
the background task would panic. There was no way to customize that so
users that might wanna report the error was out of luck.

Panicking also wasn't great because users might abort on panics which
would bring down the server.
@davidpdrsn davidpdrsn changed the title Add on_failed_upgrade callback to WebSocket Add on_failed_upgrade callback to WebSocketUpgrade Nov 17, 2022
axum/src/extract/ws.rs Outdated Show resolved Hide resolved
axum/src/extract/ws.rs Outdated Show resolved Hide resolved
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
@davidpdrsn davidpdrsn enabled auto-merge (squash) November 18, 2022 10:45
@davidpdrsn davidpdrsn merged commit ba8e9c1 into main Nov 18, 2022
@davidpdrsn davidpdrsn deleted the add-ws-on-failed-upgrade branch November 18, 2022 10:53
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