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.
This commit is contained in:
Willy Tarreau 2017-10-05 17:24:42 +02:00
parent ecdb3fe9f4
commit 9fbbff6de4
1 changed files with 1 additions and 0 deletions

View File

@ -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. * layer to try to signal it to the peer before we close.
*/ */
cs_shutw(cs, CS_SHW_NORMAL); cs_shutw(cs, CS_SHW_NORMAL);
conn_sock_shutw(conn);
/* If the stream interface is configured to disable half-open /* If the stream interface is configured to disable half-open
* connections, we'll skip the shutdown(), but only if the * connections, we'll skip the shutdown(), but only if the