diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-06 05:10:07 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-06 05:10:07 +0000 |
commit | 516ef41ac1fd26f338cf1d36ec9d2bf0beedaa5c (patch) | |
tree | 8e67c8cd527141973334ac818f932c96040106ea /src/or/connection_edge.c | |
parent | c362ed877dc3e507b806594e35b4240326e6e8d5 (diff) | |
download | tor-516ef41ac1fd26f338cf1d36ec9d2bf0beedaa5c.tar tor-516ef41ac1fd26f338cf1d36ec9d2bf0beedaa5c.tar.gz |
if a stream times out after 15s without a connected cell,
don't try that circuit again.
svn:r1239
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 848003012..351133c44 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -568,7 +568,12 @@ void connection_ap_expire_beginning(void) { */ 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 */ |