Replies: 1 comment 3 replies
-
I'm not sure I understand why this works and why axum task is killed in original code. Is this the right way to do it? |
Beta Was this translation helpful? Give feedback.
3 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.
-
Summary
I have two tasks that I want to shutdown on
shutdown_signal()
. When I usedtokio::select
on the second task along withshutdown_signal()
, I had to pressctrl + c
twice, once to get axum to shutdown and then to shutdown the deletion task.I figured I could use a CancellationToken and cancel both tasks at once but with this Axum doesn't close connections gracefully. Am I missing something?
Here is the code:

axum version
0.7.4
Beta Was this translation helpful? Give feedback.
All reactions