diff options
author | Roger Dingledine <arma@torproject.org> | 2003-10-21 08:37:07 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-10-21 08:37:07 +0000 |
commit | 4a66865d0be89445e70230548e7cf2a1cbd59db5 (patch) | |
tree | 48f8d1fbd755c03d97023f4a50d8095e919515cd /src/or/dns.c | |
parent | f8a72b1c217c182f41a71122eb5e01bc5d0e7f77 (diff) | |
download | tor-4a66865d0be89445e70230548e7cf2a1cbd59db5.tar.gz tor-4a66865d0be89445e70230548e7cf2a1cbd59db5.zip |
send the end cell when we realize we're going to end,
not when we're closing the stream.
this lets us put a payload in the end cell if we want to,
to describe why we're closing the stream.
there are still some places where we don't send the end cell
immediately. i need to track them down. but it's a low priority,
since i've made it send the end cell when we close the stream if
we haven't already sent it.
svn:r640
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 7c0566c80b..ac25a9dd5f 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -220,7 +220,7 @@ void dns_cancel_pending_resolve(char *question, connection_t *onlyconn) { /* mark all pending connections to fail */ while(resolve->pending_connections) { pend = resolve->pending_connections; -/*ENDCLOSE*/ pend->conn->marked_for_close = 1; + connection_edge_end(pend->conn, NULL, 0, NULL); resolve->pending_connections = pend->next; free(pend); } @@ -273,7 +273,7 @@ static void dns_found_answer(char *question, uint32_t answer) { pend = resolve->pending_connections; pend->conn->addr = resolve->answer; if(resolve->state == CACHE_STATE_FAILED || connection_exit_connect(pend->conn) < 0) { -/*ENDCLOSE*/ pend->conn->marked_for_close = 1; + connection_edge_end(pend->conn, NULL, 0, NULL); } resolve->pending_connections = pend->next; free(pend); |