aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/dns.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 75a45170cf..ac24de2433 100644
--- a/src/or/dns.c
+++ b/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 */