Make event_remove_timer behave correctly with persistent timers

This commit is contained in:
Nick Mathewson 2013-02-12 15:10:50 -05:00
parent 74e52db45d
commit 5623e80371

View File

@ -2207,6 +2207,7 @@ event_remove_timer_nolock_(struct event *ev)
/* If it's not pending on a timeout, we don't need to do anything. */
if (ev->ev_flags & EVLIST_TIMEOUT) {
event_queue_remove_timeout(base, ev);
evutil_timerclear(&ev->ev_.ev_io.ev_timeout);
}
return (0);