]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: add a new CO_FL_WANT_DRAIN flag to force drain on close
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Oct 2021 19:31:42 +0000 (21:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Oct 2021 19:48:23 +0000 (21:48 +0200)
commit20b622e04b27e76f7b4be0c09b435e8799143d75
tree3d931ad0eabf57ecb411b3235edbad334fefe462
parente6dc7a0129b8b34e7e1ce1f4bda5d4bfee4ab749
MINOR: connection: add a new CO_FL_WANT_DRAIN flag to force drain on close

Sometimes we'd like to do our best to drain pending data before closing
in order to save the peer from risking to receive an RST on close.

This adds a new connection flag CO_FL_WANT_DRAIN that is used to
trigger a call to conn_ctrl_drain() from conn_ctrl_close(), and the
sock_drain() function ignores fd_recv_ready() if this flag is set,
in order to catch latest data. It's not used for now.
include/haproxy/connection-t.h
include/haproxy/connection.h
src/sock.c