BUG/MEDIUM: stconn: Don't needlessly wake the stream on send during fast-forward
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Feb 2023 13:14:38 +0000 (14:14 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 10 Feb 2023 08:09:57 +0000 (09:09 +0100)
commit71c486b290d49a0d278fc7f822dd451c31aaf144
treee40ef99968df5e425c7fe695228f97a2eb41ea47
parent10a46de620f5bd7f2cddeb3fe0fd735d316b9078
BUG/MEDIUM: stconn: Don't needlessly wake the stream on send during fast-forward

With a connection, when data are received, if these data are sent to the
opposite side because the fast-forwarding is possible, the stream may be
woken up on some conditions (at the end of sc_app_chk_snd_conn()):

  * The channel is shut for write
  * The SC is not in the "established" state
  * The stream must explicitly be woken up on write and all data was sent
  * The connection was just established.

A bug on the last condition was introduced with the commit d89884153
("MEDIUM: channel: Use CF_WRITE_EVENT instead of CF_WRITE_PARTIAL"). The
stream is now woken up on any write events.

This patch fixes this issue and restores the original behavior. No backport
is needed.
src/stconn.c