Skip to content

Commit 110c702

Browse files
committed
Revert "fix(http1): fix rare missed write wakeup on connections (#974)"
This reverts commit d6bccef.
1 parent 6a1a406 commit 110c702

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/core/client/proto/h1/dispatch.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,7 @@ where
136136
for _ in 0..16 {
137137
let _ = self.poll_read(cx)?;
138138
let _ = self.poll_write(cx)?;
139-
let conn_ready = self.poll_flush(cx)?.is_ready();
140-
141-
// If we can write more body and the connection is ready, we should
142-
// write again. If we return `Ready(Ok(())` here, we will yield
143-
// without a guaranteed wakeup from the write side of the connection.
144-
// This would lead to a deadlock if we also don't expect reads.
145-
let wants_write_again = self.body_rx.is_some() && conn_ready;
139+
let _ = self.poll_flush(cx)?;
146140

147141
// This could happen if reading paused before blocking on IO,
148142
// such as getting to the end of a framed message, but then
@@ -152,11 +146,7 @@ where
152146
//
153147
// Using this instead of task::current() and notify() inside
154148
// the Conn is noticeably faster in pipelined benchmarks.
155-
let wants_read_again = self.conn.wants_read_again();
156-
157-
// If we cannot write or read again, we yield and rely on the
158-
// wakeup from the connection futures.
159-
if !(wants_write_again || wants_read_again) {
149+
if !self.conn.wants_read_again() {
160150
//break;
161151
return Poll::Ready(Ok(()));
162152
}

0 commit comments

Comments
 (0)