aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-25 06:57:57 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-25 06:57:57 +0000
commit1b25794a56654e115fa46ac9bfc6334753f6dda1 (patch)
tree37a2c4bfed1532d83719bd73a8cccf53199d66dc /src
parent8da2e00a83b1fd1e7dba8ad07422ee34ba3ca97d (diff)
downloadtor-1b25794a56654e115fa46ac9bfc6334753f6dda1.tar
tor-1b25794a56654e115fa46ac9bfc6334753f6dda1.tar.gz
bugfix: if the exit stream is pending on the resolve, and a destroy
arrives, then the stream wasn't getting removed from the pending list. this may have been the lucky-bug. this commit may also not actually fix the bug. it's darn hard to reproduce. svn:r1122
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 2644a60e6..7c51558d2 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -682,6 +682,10 @@ int connection_send_destroy(uint16_t circ_id, connection_t *conn) {
if(!connection_speaks_cells(conn)) {
log_fn(LOG_INFO,"CircID %d: At an edge. Marking connection for close.",
circ_id);
+ if(conn->type == CONN_TYPE_EXIT && conn->state == EXIT_CONN_STATE_RESOLVING) {
+ log_fn(LOG_INFO,"...and informing resolver we don't want the answer anymore.");
+ dns_cancel_pending_resolve(conn->address, conn);
+ }
if(connection_edge_end(conn, END_STREAM_REASON_DESTROY, conn->cpath_layer) < 0)
log_fn(LOG_WARN,"1: I called connection_edge_end redundantly.");
/* if they already sent a destroy, they know. XXX can just close? */