commit 74432aeff71116f733d0b6de1ccb09091bb36ee6
parent ce8290cefcbef1a291a08a7d2dabf2212ce04c24
Author: Joris Vink <joris@coders.se>
Date: Tue, 16 Jun 2020 17:29:45 +0200
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.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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;