]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-h1: Close connection on shutr only when shutw was really done
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Jan 2019 09:43:36 +0000 (10:43 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Jan 2019 10:31:16 +0000 (11:31 +0100)
commitf3eb2b1c24d40ca745293a83a872d4e3f2b212c3
treed4a19c79a019516838c6da26f3b386d002a9fcb8
parent0656d9ca7550c6e0bab1c93e7408b24e80eb3466
BUG/MINOR: mux-h1: Close connection on shutr only when shutw was really done

In h1_shutr(), to fully close the connection, we must be sure the shutdown write
was already performed on the connection. So we know rely on connection flags
instead of conn_stream flags. If CO_FL_SOCK_WR_SH is already set when h1_shutr()
is called, we can do a full connection close. Otherwise, we just do the shutdown
read.

Without this patch, it is possible to close the connection too early with some
outgoing data in the output buf.

This patch must be backported to 1.9.
src/mux_h1.c