diff --git a/src/checks.c b/src/checks.c index 1a81ccdb3..b0de77088 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1442,12 +1442,13 @@ static int wake_srv_chk(struct conn_stream *cs) } if (check->result != CHK_RES_UNKNOWN) { - /* We're here because nobody wants to handle the error, so we - * sure want to abort the hard way. - */ + /* Check complete or aborted. If connection not yet closed do it + * now and wake the check task up to be sure the result is + * handled ASAP. */ conn_sock_drain(conn); cs_close(cs); ret = -1; + task_wakeup(check->task, TASK_WOKEN_IO); } if (check->server)