File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 88
88
pub fn poll_without_shutdown ( & mut self , cx : & mut Context < ' _ > ) -> Poll < crate :: Result < ( ) > > {
89
89
self . inner . poll_without_shutdown ( cx)
90
90
}
91
+
92
+ /// Prevent shutdown of the underlying IO object at the end of service the request,
93
+ /// instead run `into_parts`. This is a convenience wrapper over `poll_without_shutdown`.
94
+ pub fn without_shutdown ( self ) -> impl Future < Output = crate :: Result < Parts < T > > > {
95
+ let mut conn = Some ( self ) ;
96
+ futures_util:: future:: poll_fn ( move |cx| -> Poll < crate :: Result < Parts < T > > > {
97
+ ready ! ( conn. as_mut( ) . unwrap( ) . poll_without_shutdown( cx) ) ?;
98
+ Poll :: Ready ( Ok ( conn. take ( ) . unwrap ( ) . into_parts ( ) ) )
99
+ } )
100
+ }
91
101
}
92
102
93
103
/// A builder to configure an HTTP connection.
You can’t perform that action at this time.
0 commit comments