From 74432aeff71116f733d0b6de1ccb09091bb36ee6 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Tue, 16 Jun 2020 17:29:45 +0200 Subject: [PATCH] Set netwait to 10ms if a signal is pending. If a signal is delivered after the signal check in the worker loop we could end up in a scenario where we wait for i/o to start triggering it. --- src/worker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/worker.c b/src/worker.c index 028c300..d2d844f 100644 --- a/src/worker.c +++ b/src/worker.c @@ -465,6 +465,8 @@ kore_worker_entry(struct kore_worker *kw) netwait = kore_timer_next_run(now); if (netwait == KORE_WAIT_INFINITE) { + if (sig_recv != 0) + netwait = 10; #if !defined(KORE_NO_HTTP) if (http_request_count > 0) netwait = 100;