diff options
author | Roger Dingledine <arma@torproject.org> | 2008-04-22 18:38:25 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-04-22 18:38:25 +0000 |
commit | d72b256f4f0a3a9c90793ea12daae7af74072a16 (patch) | |
tree | 3d82b0bfa283e01c5cbfd417dda1aa515749bc06 /src/or/connection_or.c | |
parent | bc95a4dbcb8689c40521d442dd149e553b7e3880 (diff) | |
download | tor-d72b256f4f0a3a9c90793ea12daae7af74072a16.tar.gz tor-d72b256f4f0a3a9c90793ea12daae7af74072a16.zip |
When we choose to abandon a new entry guard because we think our
older ones might be better, close any circuits pending on that
new entry guard connection. Bugfix on 0.1.2.8-beta; found by lodger.
svn:r14417
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 00217f2dcb..6c44840862 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -889,7 +889,12 @@ connection_or_set_state_open(or_connection_t *conn) rep_hist_note_connect_succeeded(conn->identity_digest, now); if (entry_guard_register_connect_status(conn->identity_digest, 1, now) < 0) { - /* pending circs get closed in circuit_about_to_close_connection() */ + /* Close any circuits pending on this conn. We leave it in state + * 'open' though, because it didn't actually *fail* -- we just + * chose not to use it. (Otherwise + * connection_about_to_close_connection() will call a big pile of + * functions to indicate we shouldn't try it again.) */ + circuit_n_conn_done(conn, 0); return -1; } router_set_status(conn->identity_digest, 1); |