[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] don"t crash, if a conn that sent a begin has suddenly lost ...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] don"t crash, if a conn that sent a begin has suddenly lost ...
- From: arma@seul.org (Roger Dingledine)
- Date: Sun, 25 Apr 2004 18:48:49 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 25 Apr 2004 18:49:05 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
	connection_edge.c 
Log Message:
don't crash, if a conn that sent a begin has suddenly lost its circuit
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- connection_edge.c	25 Apr 2004 20:37:37 -0000	1.177
+++ connection_edge.c	25 Apr 2004 22:48:47 -0000	1.178
@@ -620,6 +620,11 @@
       continue;
     conn->num_retries++;
     circ = circuit_get_by_conn(conn);
+    if(!circ) { /* it's vanished? */
+      log_fn(LOG_INFO,"Conn is in connect-wait, but lost its circ.");
+      connection_mark_for_close(conn,0);
+      continue;
+    }
     if(circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
       if (now - conn->timestamp_lastread > 45) {
         log_fn(LOG_WARN,"Rend stream is %d seconds late. Giving up.",