Skip to content

uloop_run_events was not awakened when the first timeout was added. #11

@trnny

Description

@trnny

libubox/uloop.c

Lines 667 to 678 in c1be505

uloop_process_timeouts();
if (do_sigchld)
uloop_handle_processes();
if (uloop_cancelled)
break;
next_time = uloop_get_next_timeout();
if (timeout >= 0 && (next_time < 0 || timeout < next_time))
next_time = timeout;
uloop_run_events(next_time);

consider the following case:
uloop_run_events (-1) was entered when there is no next_timeout
and then executing uloop_timeout_add to add a timeout "task" that will not wake up uloop_run_events
the timeout "task" will never be executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions