Skip to content

Commit d891931

Browse files
authored
refactor(client): remove old body delay_eof code (#208)
1 parent 1f11a12 commit d891931

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/client/legacy/client.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -358,21 +358,8 @@ where
358358
// It won't be ready if there is a body to stream.
359359
if pooled.is_http2() || !pooled.is_pool_enabled() || pooled.is_ready() {
360360
drop(pooled);
361-
} else if !res.body().is_end_stream() {
362-
//let (delayed_tx, delayed_rx) = oneshot::channel::<()>();
363-
//res.body_mut().delayed_eof(delayed_rx);
364-
let on_idle = poll_fn(move |cx| pooled.poll_ready(cx)).map(move |_| {
365-
// At this point, `pooled` is dropped, and had a chance
366-
// to insert into the pool (if conn was idle)
367-
//drop(delayed_tx);
368-
});
369-
370-
self.exec.execute(on_idle);
371361
} else {
372-
// There's no body to delay, but the connection isn't
373-
// ready yet. Only re-insert when it's ready
374362
let on_idle = poll_fn(move |cx| pooled.poll_ready(cx)).map(|_| ());
375-
376363
self.exec.execute(on_idle);
377364
}
378365

0 commit comments

Comments
 (0)