BUG/MEDIUM: stconn/stream: Forward shutdown on write timeout
The commit 7f59d68fe2 ("BUG/MEDIIM: stconn: Flush output data before
forwarding close to write side") introduced a regression. When a write
timeout is detected, the shutdown is no longer forwarded. Dependig on the
channels state, it may block the processing, waiting the client or the
server leaves.
The commit above tries to avoid to truncate messages on shutdown but on
write timeout, if the channel is not empty, there is nothing more we can do
to send these data. It means the endpoint is unable to send data. In this
case, we must forward the shutdown.
This patch should be backported as far as 2.2.
(cherry picked from commit b9c87f808288c833d14eefacb4894bdae32fbdc8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 406b81c28d267c6e798065a9e6a6c2ce2c2e418a)
[cf: ctx adjt]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit acdecac7f4eeea84f7d87b0cd58b393b86aa5be2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit fafa736dde00f1ec585ffd7566279c33f682e72f)
[cf: patch applied on stream_interface.c instead of stconn.c]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
2 files changed