[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] if a stream times out after 15s without a connected cell,



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:
if a stream times out after 15s without a connected cell,
don't try that circuit again.


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- connection_edge.c	3 Mar 2004 08:46:18 -0000	1.112
+++ connection_edge.c	6 Mar 2004 05:10:07 -0000	1.113
@@ -568,7 +568,12 @@
        */
       conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
       circuit_detach_stream(circ, conn);
-      /* give it another 15 seconds to try */
+      /* kludge to make us not try this circuit again, yet to allow
+       * current streams on it to survive if they can: make it
+       * unattractive to use for new streams */
+      assert(circ->timestamp_dirty);
+      circ->timestamp_dirty -= options.NewCircuitPeriod;
+      /* give our stream another 15 seconds to try */
       conn->timestamp_lastread += 15;
       if(connection_ap_handshake_attach_circuit(conn)<0) {
         /* it will never work */