Fix a resolver crash and an v4-compatible address parsing crash.
[ircu2.10.12-pk.git] / ircd / ircd_res.c
index e56c6cd9956a1af657788383a800ad8eb4d35368..6ed86662a255f19725ddbb6960715fcad8e922fc 100644 (file)
@@ -278,7 +278,7 @@ check_resolver_timeout(time_t when)
 {
   if (when > CurrentTime + AR_TTL)
     when = CurrentTime + AR_TTL;
-  if (!t_onqueue(&res_timeout))
+  if (!t_active(&res_timeout) || !t_onqueue(&res_timeout))
     timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when);
   else if (when < t_expire(&res_timeout))
     timer_chg(&res_timeout, TT_ABSOLUTE, when);