summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-12 00:59:48 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-12 00:59:48 -0500
commit2d123efe7c98765fae17af747b266ea8cc0b4b5c (patch)
treed9132cd506dfe7254948a3461fa4bf97e06f138b /src/or/dns.c
parent2dac77c041df0a6b69cde43216f6e17812193d60 (diff)
parentc9dd2d1a6ad2684442abb7a31e29b0998aaf605c (diff)
downloadtor-2d123efe7c98765fae17af747b266ea8cc0b4b5c.tar.gz
tor-2d123efe7c98765fae17af747b266ea8cc0b4b5c.zip
Merge remote-tracking branch 'origin/maint-0.2.5'
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 129ca395b6..cc4a169422 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -558,6 +558,8 @@ purge_expired_resolves(time_t now)
/* Connections should only be pending if they have no socket. */
tor_assert(!SOCKET_OK(pend->conn->base_.s));
pendconn = pend->conn;
+ /* Prevent double-remove */
+ pendconn->base_.state = EXIT_CONN_STATE_RESOLVEFAILED;
if (!pendconn->base_.marked_for_close) {
connection_edge_end(pendconn, END_STREAM_REASON_TIMEOUT);
circuit_detach_stream(circuit_get_by_edge_conn(pendconn), pendconn);
@@ -1133,7 +1135,9 @@ connection_dns_remove(edge_connection_t *conn)
return; /* more are pending */
}
}
- tor_assert(0); /* not reachable unless onlyconn not in pending list */
+ log_warn(LD_BUG, "Connection (fd "TOR_SOCKET_T_FORMAT") was not waiting "
+ "for a resolve of %s, but we tried to remove it.",
+ conn->base_.s, escaped_safe_str(conn->base_.address));
}
}