Commit 23c193c0 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

if dns resolve is valid, but our exit policy rejects it or

the connect attempt fails immediately, we were trying to
double-remove it from the dns pending list.

i think this might have been The Bug.
(thanks weasel!)


svn:r1587
parent 8f8d185f
......@@ -376,9 +376,9 @@ static void dns_found_answer(char *address, uint32_t addr, char outcome) {
pend = resolve->pending_connections;
assert_connection_ok(pend->conn,time(NULL));
pend->conn->addr = resolve->addr;
/* prevent double-remove */
pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
if(resolve->state == CACHE_STATE_FAILED) {
/* prevent double-remove */
pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
pendconn = pend->conn; /* don't pass complex things to the
connection_mark_for_close macro */
connection_mark_for_close(pendconn, END_STREAM_REASON_RESOLVEFAILED);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment