mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-14 15:34:35 +00:00
BUG/MEDIUM: connections: Don't call shutdown() if we want to disable linger.
In conn_sock_shutw(), avoid calling shutdown() if linger_risk is set. Not doing so will result in getting sockets in TIME_WAIT for some time. This is particularly observable with health checks. This should be backported to 1.9.
This commit is contained in:
parent
86eded6c69
commit
fe4abe62c7
@ -352,7 +352,8 @@ static inline void conn_sock_shutw(struct connection *c, int clean)
|
||||
/* don't perform a clean shutdown if we're going to reset or
|
||||
* if the shutr was already received.
|
||||
*/
|
||||
if (conn_ctrl_ready(c) && !(c->flags & CO_FL_SOCK_RD_SH) && clean)
|
||||
if (conn_ctrl_ready(c) && !(c->flags & CO_FL_SOCK_RD_SH) && clean &&
|
||||
!fdtab[c->handle.fd].linger_risk)
|
||||
shutdown(c->handle.fd, SHUT_WR);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user