feat(server): add Server::with_graceful_shutdown method
This adds a "combinator" method to `Server`, which accepts a user's future to "select" on. All connections received by the `Server` will be tracked, and if the user's future finishes, graceful shutdown will begin. - The listener will be closed immediately. - The currently active connections will all be notified to start a graceful shutdown. For HTTP/1, that means finishing the existing response and using `connection: clone`. For HTTP/2, the graceful `GOAWAY` process is started. - Once all active connections have terminated, the graceful future will return. Closes #1575
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
mod buf;
|
||||
pub(crate) mod drain;
|
||||
mod exec;
|
||||
pub(crate) mod io;
|
||||
mod lazy;
|
||||
|
||||
Reference in New Issue
Block a user