diff --git a/src/wdt.c b/src/wdt.c index 9f5b81729..865bb7b25 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -83,7 +83,7 @@ void wdt_handler(int sig, siginfo_t *si, void *arg) if (!p || n - p < 1000000000UL) goto update_and_leave; - if ((_HA_ATOMIC_LOAD(&th_ctx->flags) & TH_FL_SLEEPING) && + if ((_HA_ATOMIC_LOAD(&ha_thread_ctx[thr].flags) & TH_FL_SLEEPING) || (_HA_ATOMIC_LOAD(&ha_tgroup_ctx[tgrp-1].threads_harmless) & thr_bit)) { /* This thread is currently doing exactly nothing * waiting in the poll loop (unlikely but possible),