[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] don"t detach-and-retry rendezvous streams
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 detach-and-retry rendezvous streams
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- connection_edge.c 5 Apr 2004 18:22:00 -0000 1.141
+++ connection_edge.c 5 Apr 2004 22:43:01 -0000 1.142
@@ -595,6 +595,15 @@
continue;
conn->num_retries++;
circ = circuit_get_by_conn(conn);
+ 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.",
+ (int)(now - conn->timestamp_lastread));
+ connection_mark_for_close(conn,END_STREAM_REASON_TIMEOUT);
+ }
+ continue;
+ }
+ assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
if(conn->num_retries >= MAX_STREAM_RETRIES) {
log_fn(LOG_WARN,"Stream is %d seconds late. Giving up.",
15*conn->num_retries);