mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
MINOR: proxy: use tg->threads_enabled in hard_stop() to detect stopped threads
Let's rely on tg->threads_enabled there to detect running threads. We should probably have a dedicated function for this in order to simplify the code and avoid the risk of using the wrong group ID.
This commit is contained in:
parent
24cfc9f76e
commit
7509ec369a
@ -2140,7 +2140,7 @@ struct task *hard_stop(struct task *t, void *context, unsigned int state)
|
|||||||
send_log(NULL, LOG_WARNING, "Some tasks resisted to hard-stop, exiting now.\n");
|
send_log(NULL, LOG_WARNING, "Some tasks resisted to hard-stop, exiting now.\n");
|
||||||
killed = 2;
|
killed = 2;
|
||||||
for (thr = 0; thr < global.nbthread; thr++)
|
for (thr = 0; thr < global.nbthread; thr++)
|
||||||
if (((all_threads_mask & ~tid_bit) >> thr) & 1)
|
if (ha_thread_info[thr].tg->threads_enabled & ha_thread_info[thr].ltid_bit)
|
||||||
wake_thread(thr);
|
wake_thread(thr);
|
||||||
t->expire = TICK_ETERNITY;
|
t->expire = TICK_ETERNITY;
|
||||||
return t;
|
return t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user