From: Felix Fietkau Date: Fri, 11 Feb 2011 01:38:32 +0000 (+0100) Subject: uloop: allow timeouts to cancel the event loop X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=commitdiff_plain;h=83037e345dd702f2a013322139ef0b7bab7e170f uloop: allow timeouts to cancel the event loop --- diff --git a/uloop.c b/uloop.c index 8410634..c2a7b3e 100644 --- a/uloop.c +++ b/uloop.c @@ -383,6 +383,8 @@ void uloop_run(void) { gettimeofday(&tv, NULL); uloop_process_timeouts(&tv); + if (uloop_cancelled) + break; uloop_run_events(uloop_get_next_timeout(&tv)); } }