BUG/MINOR: stconn: Request to send something to be woken up when the pipe is full
After a receive via the kernel splicing, if the pipe is full, more room is
requested. But we must be sure something was sent to wake the SC up.
Otherwise, if sends are skipped, because there was a connection error for
instance, some extra wakeups may be experienced. On newer versions, this fix
was included by chance when the zero-copy data forwarding was introduced. On
older versions, the API is not the same when the issue does not exist.
It is 2.8-specific. There is no upstream commit ID. And no backport needed.
diff --git a/src/stconn.c b/src/stconn.c
index ebe05bc..777f47b 100644
--- a/src/stconn.c
+++ b/src/stconn.c
@@ -1305,7 +1305,7 @@
/* the pipe is full or we have read enough data that it
* could soon be full. Let's stop before needing to poll.
*/
- sc_need_room(sc, 0);
+ sc_need_room(sc, -1);
goto done_recv;
}