From: root Date: Wed, 14 Nov 2007 04:53:21 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: rel-0_9~3 X-Git-Url: https://git.llucax.com/software/libev.git/commitdiff_plain/3bf1eb4a5e1e1dabdc1b44665d2eb49cecd04593 *** empty log message *** --- diff --git a/ev.c b/ev.c index 0b2340e..d04f786 100644 --- a/ev.c +++ b/ev.c @@ -1162,7 +1162,7 @@ ev_loop (EV_P_ int flags) double block; loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) ? 1 : 0; - do + while (activecnt) { /* queue check watchers (and execute them) */ if (expect_false (preparecnt)) @@ -1235,8 +1235,10 @@ ev_loop (EV_P_ int flags) queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); call_pending (EV_A); + + if (loop_done) + break; } - while (activecnt && !loop_done); if (loop_done != 2) loop_done = 0;