File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ where I: AsyncRead + AsyncWrite,
306
306
}
307
307
}
308
308
309
- fn has_queued_body ( & self ) -> bool {
309
+ pub fn has_queued_body ( & self ) -> bool {
310
310
match self . state . writing {
311
311
Writing :: Body ( _, Some ( _) ) => true ,
312
312
_ => false ,
Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ where
148
148
self . conn . close_write ( ) ;
149
149
return Ok ( Async :: Ready ( ( ) ) ) ;
150
150
}
151
+ } else if self . conn . has_queued_body ( ) {
152
+ try_ready ! ( self . poll_flush( ) ) ;
151
153
} else if let Some ( mut body) = self . body_rx . take ( ) {
152
154
let chunk = match body. poll ( ) ? {
153
155
Async :: Ready ( Some ( chunk) ) => {
@@ -165,7 +167,7 @@ where
165
167
return Ok ( Async :: NotReady ) ;
166
168
}
167
169
} ;
168
- self . conn . write_body ( Some ( chunk) ) ?;
170
+ assert ! ( self . conn. write_body( Some ( chunk) ) ?. is_ready ( ) ) ;
169
171
} else {
170
172
return Ok ( Async :: NotReady ) ;
171
173
}
You can’t perform that action at this time.
0 commit comments