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.
This commit is contained in:
Joris Vink 2020-06-16 17:29:45 +02:00
parent ce8290cefc
commit 74432aeff7
1 changed files with 2 additions and 0 deletions

View File

@ -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;