Skip to content

Getting TCP reset using tokio_boring + Hyper on the server when closing connections #3400

Answered by OldMansKid
OldMansKid asked this question in Q&A
Discussion options

You must be logged in to vote

I solved this (mostly) through a hacky method. I created a wrapper over tokio's TcpStream with a cancellation token, before calling graceful_shutdown(), I cancel the token first to signal the wrapper to block all write attempts. Now I have this nice TCP closing process:

Thank you a lot for creating this library, I switched from C++ to Rust almost entirely because of Hyper.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@OldMansKid
Comment options

@OldMansKid
Comment options

@seanmonstar
Comment options

@OldMansKid
Comment options

Answer selected by OldMansKid
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