BUG: tcp: option nolinger does not work on backends
Daniel Rankov reported that "option nolinger" is inefficient on backends. The reason is that it is set on the file descriptor only, which does not prevent haproxy from performing a clean shutdown() before closing. We must set the flag on the stream_interface instead if we want an RST to be emitted upon active close.
This commit is contained in:
parent
19ae56b2b6
commit
f6f8225390
|
@ -267,7 +267,7 @@ int tcp_connect_server(struct stream_interface *si)
|
|||
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof(one));
|
||||
|
||||
if (be->options & PR_O_TCP_NOLING)
|
||||
setsockopt(fd, SOL_SOCKET, SO_LINGER, &nolinger, sizeof(struct linger));
|
||||
si->flags |= SI_FL_NOLINGER;
|
||||
|
||||
/* allow specific binding :
|
||||
* - server-specific at first
|
||||
|
|
Loading…
Reference in New Issue