]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cli: Never wait for more data on client shutdown
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Jan 2022 07:44:23 +0000 (08:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Jan 2022 17:56:39 +0000 (18:56 +0100)
commit0f727dabf51d4ffead40fd43feb7c07193ebde99
tree9a9021cbf91dd6b25bddcbf994ad7351af30f154
parent94fca87f6ac0d33e14a4505f9e6fdc61a12202e4
BUG/MEDIUM: cli: Never wait for more data on client shutdown

When a shutdown is detected on the cli, we try to execute all pending
commands first before closing the connection. It is required because
commands execution is serialized. However, when the last part is a partial
command, the cli connection is not closed, waiting for more data. Because
there is no timeout for now on the cli socket, the connection remains
infinitely in this state. And because the maxconn is set to 10, if it
happens several times, the cli socket quickly becomes unresponsive because
all its slots are waiting for more data on a closed connections.

This patch should fix the issue #1512. It must be backported as far as 2.0.
src/cli.c