aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-28 22:13:58 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-28 22:13:58 +0000
commit9a557007475a9f8c79d4e6bbb56195fd0a81d60b (patch)
tree1e983263eef62ed6f7d2ed5aa96b9133c0fd4517 /src
parent833d14246d3f512f6a0411c9cc6b455e05fbb35b (diff)
downloadtor-9a557007475a9f8c79d4e6bbb56195fd0a81d60b.tar
tor-9a557007475a9f8c79d4e6bbb56195fd0a81d60b.tar.gz
add a log_warn to notify us of yet another potential dns.c bug
svn:r1167
Diffstat (limited to 'src')
-rw-r--r--src/or/dns.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index c05fcbd32..7c1d58c1c 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -76,6 +76,12 @@ static void purge_expired_resolves(uint32_t now) {
while(oldest_cached_resolve && (oldest_cached_resolve->expire < now)) {
resolve = oldest_cached_resolve;
log(LOG_DEBUG,"Forgetting old cached resolve (expires %lu)", (unsigned long)resolve->expire);
+ if(resolve->state == CACHE_STATE_PENDING) {
+ log_fn(LOG_WARN,"Expiring a dns resolve that's still pending. Forgot to cull it?");
+ /* XXX if resolve->pending_connections is used, then we're probably
+ * introducing bugs by closing resolve without notifying those streams.
+ */
+ }
oldest_cached_resolve = resolve->next;
if(!oldest_cached_resolve) /* if there are no more, */
newest_cached_resolve = NULL; /* then make sure the list's tail knows that too */