diff --git a/event.c b/event.c index c632a109..b9b4e28f 100644 --- a/event.c +++ b/event.c @@ -725,7 +725,8 @@ event_queue_remove(struct event_base *base, struct event *ev, int queue) ev->ev_flags &= ~queue; switch (queue) { case EVLIST_ACTIVE: - base->event_count_active--; + if (docount) + base->event_count_active--; TAILQ_REMOVE(base->activequeues[ev->ev_pri], ev, ev_active_next); break; diff --git a/test/regress.c b/test/regress.c index 33d10d73..ebab6cc5 100644 --- a/test/regress.c +++ b/test/regress.c @@ -622,7 +622,6 @@ test_multiple_events_for_same_fd(void) setup_test("Multiple events for same fd: "); - event_init(); event_set(&e1, pair[0], EV_READ, test_multiple_cb, NULL); event_add(&e1, NULL); event_set(&e2, pair[0], EV_WRITE, test_multiple_cb, NULL);