summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-11-24 08:33:15 +0000
committerRoger Dingledine <arma@torproject.org>2002-11-24 08:33:15 +0000
commit5a82a491a81638498530b7760eb2f67f5c176725 (patch)
tree92bb9f900134ba784b8cf67647189d8ed3fd2eca /src
parentab0aee04d910520ca8e683356069e53997908b85 (diff)
downloadtor-5a82a491a81638498530b7760eb2f67f5c176725.tar.gz
tor-5a82a491a81638498530b7760eb2f67f5c176725.zip
fixed rare race condition
svn:r138
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_exit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection_exit.c b/src/or/connection_exit.c
index cc3e5ffc99..aa94e6a9ea 100644
--- a/src/or/connection_exit.c
+++ b/src/or/connection_exit.c
@@ -76,7 +76,10 @@ int connection_exit_send_connected(connection_t *conn) {
circ = circuit_get_by_conn(conn);
- assert(circ && circ->p_conn && circ->n_conn == conn); /* is this true? i guess i'll see if it breaks. */
+ if(!circ) {
+ log(LOG_DEBUG,"connection_exit_send_connected(): client-side sent destroy just as we completed server connection. Closing.");
+ return -1;
+ }
return connection_send_connected(circ->p_aci, circ->p_conn);
}