]> git.kaiwu.me - haproxy.git/commit
MEDIUM: connection: set the socket shutdown flags on socket errors
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Dec 2013 22:44:10 +0000 (23:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Dec 2013 22:50:36 +0000 (23:50 +0100)
commit26f4a047445583666a73a4a6d621e814bc4375da
tree99f5d05a0b74f125c009eb79e4416f7d9d260282
parent7fe45698f58a53dda9182a5970a2ea4bda9f92fe
MEDIUM: connection: set the socket shutdown flags on socket errors

When we get a hard error from a syscall indicating the socket is dead,
it makes sense to set the CO_FL_SOCK_WR_SH and CO_FL_SOCK_RD_SH flags
to indicate that the socket may not be used anymore. It will ease the
error processing in health checks where the state of socket is very
important. We'll also be able to avoid some setsockopt(nolinger) after
an error.

For now, the rest of the code is not impacted because CO_FL_ERROR is
always tested prior to these flags.
src/connection.c
src/proto_tcp.c
src/raw_sock.c
src/stream_interface.c