]> git.kaiwu.me - haproxy.git/commit
[OPTIM] stream_sock: don't shutdown(write) when the socket is in error
authorWilly Tarreau <w@1wt.eu>
Sat, 16 Jan 2010 09:03:45 +0000 (10:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 16 Jan 2010 09:03:45 +0000 (10:03 +0100)
commit7340ca5a54dba6c049f712c181c5a87f72d52760
tree2b2d71b19a3d68e4e170ce2dd2008b6439ff2e3c
parent43a7e6620b79e0e771dbaf2a60b57c96d9ba60e5
[OPTIM] stream_sock: don't shutdown(write) when the socket is in error

We get a lot of those, especially with web crawlers :

recv(2, 0x810b610, 7000, 0)             = -1 ECONNRESET (Connection reset by peer)
shutdown(2, 1 /* send */)               = -1 ENOTCONN (Transport endpoint is not connected)
close(2)                                = 0

There's no need to perform the shutdown() here, the socket is already
in error so it is down.
src/stream_sock.c