Replies: 1 comment 9 replies
-
If you want to react to the disconnection, the second discussion you linked provides the answer, i.e. you'll want to use a drop guard. If you just want the handler to execute till end even if the response is discarded, you'll want to use |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi everyone, I am a rust and axum newbie. I recently encountered a problem. I want the handler to be able to complete normally when the client closes the connection during execution, instead of being interrupted directly like a program crash. I hope that when the client is interrupted, I can do some corresponding processing here. Is there any good way to solve this problem?
I saw two related discussions, but they don't quite cover my needs.(#2196) (#2817)
axum version
0.8.4
Beta Was this translation helpful? Give feedback.
All reactions