summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2008-04-02 10:55:39 +0000
committerroot <root>2008-04-02 10:55:39 +0000
commit9674435454b9c0488807c1d672b44a3e6103a21e (patch)
treea16b71230db2bdd33222d39071deba9d477008fc /ev.c
parent44f698ae2a749d552fab07dd450d4085f8f83531 (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ev.c b/ev.c
index d04a6be..4475386 100644
--- a/ev.c
+++ b/ev.c
@@ -1544,9 +1544,7 @@ static int loop_done;
void
ev_loop (EV_P_ int flags)
{
- loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK)
- ? EVUNLOOP_ONE
- : EVUNLOOP_CANCEL;
+ loop_done = EVUNLOOP_CANCEL;
call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */
@@ -1652,9 +1650,12 @@ ev_loop (EV_P_ int flags)
queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK);
call_pending (EV_A);
-
}
- while (expect_true (activecnt && !loop_done));
+ while (expect_true (
+ activecnt
+ && !loop_done
+ && !(flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK))
+ ));
if (loop_done == EVUNLOOP_ONE)
loop_done = EVUNLOOP_CANCEL;