Skip to content

Commit

Permalink
fix(client): implement without_shutdown as async fn
Browse files Browse the repository at this point in the history
  • Loading branch information
kiron1 committed Nov 21, 2023
1 parent ce1e2b5 commit 9045395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/conn/http1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ where

/// Prevent shutdown of the underlying IO object at the end of service the request,
/// instead run `into_parts`. This is a convenience wrapper over `poll_without_shutdown`.
pub fn without_shutdown(self) -> impl Future<Output = crate::Result<Parts<T>>> {
pub async fn without_shutdown(self) -> crate::Result<Parts<T>> {
let mut conn = Some(self);
futures_util::future::poll_fn(move |cx| -> Poll<crate::Result<Parts<T>>> {
ready!(conn.as_mut().unwrap().poll_without_shutdown(cx))?;
Poll::Ready(Ok(conn.take().unwrap().into_parts()))
})
.await
}
}

Expand Down

0 comments on commit 9045395

Please sign in to comment.