BUG/MEDIUM: channel: Improve reports for shut in co_getblk()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Mar 2023 13:48:27 +0000 (15:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:57:05 +0000 (08:57 +0200)
commit5f5c94617e33382621d43c3ccf0af7049c80d9c6
tree36792877950f8103a93a497eb466a1d20a2767cb
parent2726624ee7787a3c7502153c8891443081f0777c
BUG/MEDIUM: channel: Improve reports for shut in co_getblk()

When co_getblk() is called with a length and an offset to 0, shutdown is
never reported. It may be an issue when the function is called to retrieve
all available output data, while there is no output data at all. And it
seems pretty annoying to handle this case in the caller.

Thus, now, in co_getblk(), -1 is returned when the channel is empty and a
shutdown was received.

There is no real reason to backport this patch alone. However, another fix
will rely on it.
src/channel.c