Skip to content

Instantly share code, notes, and snippets.

@kazeburo
Created October 13, 2021 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazeburo/3198df2b8a6209efbcb0cb82aa758753 to your computer and use it in GitHub Desktop.
Save kazeburo/3198df2b8a6209efbcb0cb82aa758753 to your computer and use it in GitHub Desktop.
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