When a check leaves the sleeping state, we must pin it to the thread that
is processing it. It's normally always the case after the first execution,
but initial checks that start assigned to any thread (-1) could be assigned
much later, causing problems with planned changes involving queuing. Thus
better do it early, so that all threads start properly pinned.
return t;
}
}
+
+ /* OK we're keeping it so this check is ours now */
+ task_set_thread(t, tid);
}
if (check->server)
check->state |= CHK_ST_INPROGRESS;
TRACE_STATE("init new health-check", CHK_EV_TASK_WAKE|CHK_EV_HCHK_START, check);
- task_set_thread(t, tid);
-
check->current_step = NULL;
check->sc = sc_new_from_check(check, SC_FL_NONE);