]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sink: distinguish between hard and soft close in _sink_forward_io_handler()
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 23 Jul 2024 17:18:32 +0000 (19:18 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 24 Jul 2024 15:58:52 +0000 (17:58 +0200)
commitc6ab0e14e277063925ffa352b25bb096043262f8
tree4661aad01bcf0b155a4afe9c43fbd753d035014d
parentb40d804c7fa62dd204e14466fa2a6142f40ed3e1
MINOR: sink: distinguish between hard and soft close in _sink_forward_io_handler()

Aborting the socket on soft-stop is not the same as aborting it due to
unexpected error. As such, let's leverage the granularity offered by
sedesc flags to better reflect the situation: abort during soft-stop is
handled as a soft close thanks to EOI+EOS flags, while abort due to
unexpected error is handled as hard error thanks to ERROR+EOS flags.

Thanks to this change, hard error will always emit RST packet even if
the NOLINGER option wasn't set on the socket.
src/sink.c