]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: spoe: Always try to receive or send the frame to detect shutdowns
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 1 Feb 2018 07:45:22 +0000 (08:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Feb 2018 15:00:31 +0000 (16:00 +0100)
commitd5216d474d69856a282e4443f180af2093a80d6c
tree466b575cec4d318dbd0a4248fbee196a3709c379
parentf643b80429b318c24d1033f136dcfcedd8d7eede
BUG/MEDIUM: spoe: Always try to receive or send the frame to detect shutdowns

Before, we checked if the buffer was allocated or not to avoid sending or
receiving a frame. This was done to not call ci_putblk or co_getblk if there is
nothing to do. But the checks on the buffers are also done in these
functions. So this is not mandatory here. But in these functions, the channel
state is also checked, so an error is returned if it is closed. By skipping the
call, we also skip the checks on the channel state, delaying shutdowns
detection.

Now, we always try to send or receive a frame. So if the corresponding channel
is closed, we can immediatly handle the error.

This patch must be backported in 1.8
src/flt_spoe.c