BUG/MEDIUM: mcli: Properly handle errors and timeouts during reponse processing
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Mar 2022 17:20:21 +0000 (18:20 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 10 Mar 2022 09:51:21 +0000 (10:51 +0100)
commit8906dc83f4311a13c73e14ebfeda587aaf30cac4
tree6028892112f2b2be3e8cea5a9713a01130d47ed4
parentfa7ff6fc9decfb1679198bb4e4cfe4950ea0dce4
BUG/MEDIUM: mcli: Properly handle errors and timeouts during reponse processing

The response analyzer of the master CLI only handles read errors. So if
there is a write error, the session remains stuck because some outgoing data
are blocked in the channel and the response analyzer waits everything to be
sent. Because the maxconn is set to 10 for the master CLI, it may be
unresponsive if this happens to many times.

Now read and write errors, timeouts and client aborts are handled.

This patch should solve the issue #1512. It must be backported as far as
2.0.

(cherry picked from commit e8cefacfa9dc8c7893d773acb4769de73f8323d2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/cli.c