C-Ares: stop timer for timeouts in all cases.
[citadel.git] / citadel / modules / c-ares-dns / serv_c-ares-dns.c
index f48eac3877f71c6901a819f8731b9025c8ff0b98..278dd0c8a86c0868730d6dd43dbb5d8ad2520e80 100644 (file)
@@ -297,6 +297,7 @@ void QueryCbDone(AsyncIO *IO)
 
 void DestructCAres(AsyncIO *IO)
 {
+       ev_timer_stop (event_base, &IO->DNS.timeout);
        ares_destroy_options(&IO->DNS.Options);
 }
 
@@ -363,6 +364,7 @@ void QueueGetHostByNameDone(void *Ctx,
        EV_DNS_LOGT_INIT(unwind_stack);
        EV_DNS_LOGT_START(unwind_stack);
        ev_idle_start(event_base, &IO->unwind_stack);
+       ev_timer_stop (event_base, &IO->DNS.timeout);
 }
 
 void QueueGetHostByName(AsyncIO *IO,