]> granicus.if.org Git - libevent/commitdiff
Make event_remove_timer behave correctly with persistent timers
authorNick Mathewson <nickm@torproject.org>
Tue, 12 Feb 2013 20:10:50 +0000 (15:10 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 13 Feb 2013 16:41:11 +0000 (11:41 -0500)
event.c

diff --git a/event.c b/event.c
index fb20f696eeeeb562b8369c79fedec7fce65aae17..b5d9e7b84978f1770041fe791fd1feaac288e035 100644 (file)
--- a/event.c
+++ b/event.c
@@ -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);