diff --git a/src/applet.c b/src/applet.c index e24f66d05..84ffde6b8 100644 --- a/src/applet.c +++ b/src/applet.c @@ -33,10 +33,11 @@ void applet_run_active() struct stream_interface *si; struct list applet_cur_queue = LIST_HEAD_INIT(applet_cur_queue); - if (!applets_active_queue) - return; - HA_SPIN_LOCK(APPLETS_LOCK, &applet_active_lock); + if (!(active_applets_mask & tid_bit)) { + HA_SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock); + return; + } curr = LIST_NEXT(&applet_active_queue, typeof(curr), runq); while (&curr->runq != &applet_active_queue) { diff --git a/src/haproxy.c b/src/haproxy.c index 8f33e2695..ba5a4b208 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2307,7 +2307,7 @@ static void run_poll_loop() break; /* expire immediately if events are pending */ - if (fd_cache_num || (active_tasks_mask & tid_bit) || signal_queue_len || applets_active_queue) + if (fd_cache_num || (active_tasks_mask & tid_bit) || signal_queue_len || (active_applets_mask & tid_bit)) next = now_ms; /* The poller will ensure it returns around */