summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-02 09:29:01 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-02 09:29:01 +0000
commit62dcf9e20fad29e55eca6527414f305aaf99e984 (patch)
treeda611902563addfd0b7099794e29fe764bb9cf03 /src/or/circuituse.c
parentcbab134bd98984a7758ac8cd80daa4a9bf16a406 (diff)
downloadtor-62dcf9e20fad29e55eca6527414f305aaf99e984.tar.gz
tor-62dcf9e20fad29e55eca6527414f305aaf99e984.zip
some of the infrastructure to let ORs connect on demand
svn:r1998
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index e61cfa2351..3b9e2e9645 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -393,7 +393,11 @@ void circuit_about_to_close_connection(connection_t *conn) {
switch(conn->type) {
case CONN_TYPE_OR:
- /* We must close all the circuits on it. */
+ if(conn->state != OR_CONN_STATE_OPEN) {
+ /* Inform any pending (not attached) circs that they should give up. */
+ circuit_n_conn_done(conn, 0);
+ }
+ /* Now close all the attached circuits on it. */
while((circ = circuit_get_by_conn(conn))) {
if(circ->n_conn == conn) /* it's closing in front of us */
circ->n_conn = NULL;