]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: checks: external checks shouldn't wait for timeout to return the result
authorCyril Bonté <cyril.bonte@free.fr>
Wed, 6 Aug 2014 23:55:39 +0000 (01:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Aug 2014 05:23:51 +0000 (07:23 +0200)
When the child process terminates, it should wake up the associated task to
process the result immediately, otherwise it will be available only when the
task expires.

This fix is specific to the 1.6 branch.

src/checks.c

index aad2037caa16a962904fafb2a0678ac99333f526..d616e969ea3bf8202d8b8b6650102a4dca61bbdc 100644 (file)
@@ -1519,6 +1519,7 @@ static void pid_list_expire(pid_t pid, int status)
                        elem->t->expire = now_ms;
                        elem->status = status;
                        elem->exited = 1;
+                       task_wakeup(elem->t, TASK_WOKEN_IO);
                        return;
                }
        }