aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-01-31 01:27:49 +0000
committerRoger Dingledine <arma@torproject.org>2005-01-31 01:27:49 +0000
commita0312f3590defdccf3d8f6e88203a4377ad9d63d (patch)
tree217c9f0b9e188c1f527927d36fbed2db7023b056
parent692a57c8e84a633c897612e8fc6adcaf7ff9e3ab (diff)
downloadtor-a0312f3590defdccf3d8f6e88203a4377ad9d63d.tar.gz
tor-a0312f3590defdccf3d8f6e88203a4377ad9d63d.zip
don't double-detach a closing exit conn that's waiting for dns resolve
svn:r3477
-rw-r--r--src/or/connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 8e8505d1e9..854989c46d 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -215,6 +215,7 @@ void connection_free_all(void) {
*/
void connection_about_to_close_connection(connection_t *conn)
{
+ circuit_t *circ;
assert(conn->marked_for_close);
@@ -271,7 +272,9 @@ void connection_about_to_close_connection(connection_t *conn)
break;
case CONN_TYPE_EXIT:
if (conn->state == EXIT_CONN_STATE_RESOLVING) {
- circuit_detach_stream(circuit_get_by_conn(conn), conn);
+ circ = circuit_get_by_conn(conn);
+ if (circ)
+ circuit_detach_stream(circ, conn);
connection_dns_remove(conn);
}
break;