From: Willy Tarreau Date: Thu, 5 Oct 2017 15:24:42 +0000 (+0200) Subject: MEDIUM: connection: make conn_sock_shutw() aware of lingering X-Git-Tag: v1.8-rc1~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fbbff6de4222c79236043a2f9c2f5e6d7fb6c81;p=thirdparty%2Fhaproxy.git MEDIUM: connection: make conn_sock_shutw() aware of lingering Instead of having to manually handle lingering outside, let's make conn_sock_shutw() check for it before calling shutdown(). We simply don't want to emit the FIN if we're going to reset the connection due to lingering. It's particularly important for silent-drop where it's absolutely mandatory that no packet leaves the machine. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 42656ca165..9353d08ebf 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -890,6 +890,7 @@ static void stream_int_shutw_conn(struct stream_interface *si) * layer to try to signal it to the peer before we close. */ cs_shutw(cs, CS_SHW_NORMAL); + conn_sock_shutw(conn); /* If the stream interface is configured to disable half-open * connections, we'll skip the shutdown(), but only if the