Skip to content

Cancelation of dependent services #1819

Answered by davidpdrsn
vron asked this question in Q&A
Discussion options

You must be logged in to vote

axum doesn't have any knowledge of the underlying connection. All it knows is the tower Service trait. Hyper manages the connections. So you somehow need to hook in at that level to do stuff when hyper closes a connection. I'm not really sure how to do that. Try asking in the hyper repo or in #hyper in the tokio discord.

When you figure out how to do it it would be nice to add it as an example to axum. I imagine its a somewhat common thing to need.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vron
Comment options

Answer selected by vron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants