-
It should properly reply to the client, serve other ongoing requests (but not accept new requests), then exit from Implementing rejection of new requests seems relatively straightforward with an extension layer and Current kludge: tokio::spawn(async {
tokio::time::sleep(Duration::from_millis(50)).await;
exit(0);
}); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Looks like https://docs.rs/hyper/0.14.20/hyper/server/struct.Server.html#method.with_graceful_shutdown is the answer, as hinted by Alexendoo on IRC. |
Beta Was this translation helpful? Give feedback.
-
But hyper has no |
Beta Was this translation helpful? Give feedback.
Looks like https://docs.rs/hyper/0.14.20/hyper/server/struct.Server.html#method.with_graceful_shutdown is the answer, as hinted by Alexendoo on IRC.