Skip to content

Instantly share code, notes, and snippets.

@kazeburo
Created October 13, 2021 08:17
Embed
What would you like to do?
haproxy-healthcheck-busyloop-patch
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index aa6db673a..c633488b9 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -1594,7 +1594,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_recv(struct check *check, struct tcpcheck_r
goto stop;
}
if (!cur_read) {
- if (!(cs->flags & (CS_FL_WANT_ROOM|CS_FL_ERROR|CS_FL_EOS))) {
+ if (!(cs->flags & (CS_FL_WANT_ROOM|CS_FL_ERROR|CS_FL_EOS)) && !(cs->flags & CS_FL_EOI)) {
conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
TRACE_DEVEL("waiting for response", CHK_EV_RX_DATA, check);
goto wait_more_data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment