Explorar o código

bandaid: make Giorgos Pallas's dns assert bug not actually crash on him.
one day we should try to figure out what's actually going on here.


svn:r3280

Roger Dingledine %!s(int64=20) %!d(string=hai) anos
pai
achega
ba7c74e742
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/or/dns.c

+ 5 - 0
src/or/dns.c

@@ -396,6 +396,11 @@ void dns_cancel_pending_resolve(char *address) {
     return;
   }
 
+  if (!resolve->pending_connections) {
+    /* XXX this should never trigger, but sometimes it does */
+    log_fn(LOG_WARN,"Bug: Address '%s' is pending but has no pending connections!", address);
+    return;
+  }
   tor_assert(resolve->pending_connections);
 
   /* mark all pending connections to fail */