Skip to content

Commit ba4327e

Browse files
committed
Stop implementing IntoFuture for Serve via with_graceful_shutdown
1 parent 085be69 commit ba4327e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

axum/src/serve/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@ where
201201
type IntoFuture = private::ServeFuture;
202202

203203
fn into_future(self) -> Self::IntoFuture {
204-
self.with_graceful_shutdown(std::future::pending())
205-
.into_future()
204+
private::ServeFuture(Box::pin(async move {
205+
do_serve(self.listener, self.make_service, std::future::pending()).await;
206+
Ok(())
207+
}))
206208
}
207209
}
208210

0 commit comments

Comments
 (0)