mirror of
https://github.com/tokio-rs/axum.git
synced 2025-10-01 06:51:05 +00:00
Stop implementing IntoFuture for Serve via with_graceful_shutdown
This commit is contained in:
parent
7768ee2951
commit
8b968e9b94
@ -201,8 +201,10 @@ where
|
|||||||
type IntoFuture = private::ServeFuture;
|
type IntoFuture = private::ServeFuture;
|
||||||
|
|
||||||
fn into_future(self) -> Self::IntoFuture {
|
fn into_future(self) -> Self::IntoFuture {
|
||||||
self.with_graceful_shutdown(std::future::pending())
|
private::ServeFuture(Box::pin(async move {
|
||||||
.into_future()
|
do_serve(self.listener, self.make_service, std::future::pending()).await;
|
||||||
|
Ok(())
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user