diff options
author | Roger Dingledine <arma@torproject.org> | 2004-09-21 17:33:05 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-09-21 17:33:05 +0000 |
commit | d977677aa812befe8f8674d78a0b0bd26a74c451 (patch) | |
tree | e5f5ad39bc207ebee17959959aca8dbd2ce7ba31 /src/or/dns.c | |
parent | ff622786f1edf89c9ee3213d0762a98aa728cbed (diff) | |
download | tor-d977677aa812befe8f8674d78a0b0bd26a74c451.tar.gz tor-d977677aa812befe8f8674d78a0b0bd26a74c451.zip |
bugfix: when a resolve fails for a begin request, actually send
the end cell back. also, give a better reason for failure.
svn:r2358
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 19dd0e1520..3534de1b08 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -495,10 +495,9 @@ static void dns_found_answer(char *address, uint32_t addr, char outcome) { /* prevent double-remove. */ pendconn->state = EXIT_CONN_STATE_RESOLVEFAILED; if (pendconn->purpose == EXIT_PURPOSE_CONNECT) { - /*XXXX can we safely raise the detach here to happen after we - * send the end cell? */ + connection_edge_end(pendconn, END_STREAM_REASON_RESOLVEFAILED, pendconn->cpath_layer); + /* This detach must happen after we send the end cell. */ circuit_detach_stream(circuit_get_by_conn(pendconn), pendconn); - connection_edge_end(pendconn, END_STREAM_REASON_MISC, pendconn->cpath_layer); } else { send_resolved_cell(pendconn, RESOLVED_TYPE_ERROR); /* This detach must happen after we send the resolved cell. */ |