]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fixed rare race condition
authorRoger Dingledine <arma@torproject.org>
Sun, 24 Nov 2002 08:33:15 +0000 (08:33 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 24 Nov 2002 08:33:15 +0000 (08:33 +0000)
svn:r138

src/or/connection_exit.c

index cc3e5ffc99b0a851fc2b32dbc6d2e1a1823256f9..aa94e6a9ea51489ab38c0d9c1c3d10300592f026 100644 (file)
@@ -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);
 }