Now_ms can be zero nowadays, so it's not suitable for direct assignment to
t->expire, as there's a risk that the timer never wakes up once assigned
(TICK_ETERNITY). Let's use tick_add(now_ms, 0) for an immediate wakeup
instead. The impact here might be health checks suddenly stopping.
This should be backported where it applies.
* was erased during the bounce.
*/
if (!tick_isset(t->expire)) {
- t->expire = now_ms;
+ t->expire = tick_add(now_ms, 0);
expired = 0;
}
}
HA_SPIN_LOCK(PID_LIST_LOCK, &pid_list_lock);
list_for_each_entry(elem, &pid_list, list) {
if (elem->pid == pid) {
- elem->t->expire = now_ms;
+ elem->t->expire = tick_add(now_ms, 0);
elem->status = status;
elem->exited = 1;
task_wakeup(elem->t, TASK_WOKEN_IO);