diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-06-25 11:14:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-06-25 11:14:53 -0400 |
commit | bd731683070351d640e40f1a4d6320e0fe4b727e (patch) | |
tree | bc84acc127e39d972ebc56849e5ac8954fee6428 /src/or/circuituse.c | |
parent | 07e1e754f38f1f880cafdb2a9fc421d0105607f3 (diff) | |
parent | 1c1d71fe1adf9202a1e0c9e4aa35c2cb7ce1fe7b (diff) | |
download | tor-bd731683070351d640e40f1a4d6320e0fe4b727e.tar.gz tor-bd731683070351d640e40f1a4d6320e0fe4b727e.zip |
Merge remote-tracking branch 'origin/maint-0.2.6'
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 69d0f76a1a..572a4f3ed8 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -2423,6 +2423,18 @@ connection_ap_handshake_attach_circuit(entry_connection_t *conn) return 1; } + /* At this point we need to re-check the state, since it's possible that + * our call to circuit_get_open_circ_or_launch() changed the connection's + * state from "CIRCUIT_WAIT" to "RENDDESC_WAIT" because we decided to + * re-fetch the descriptor. + */ + if (ENTRY_TO_CONN(conn)->state != AP_CONN_STATE_CIRCUIT_WAIT) { + log_info(LD_REND, "This connection is no longer ready to attach; its " + "state changed." + "(We probably have to re-fetch its descriptor.)"); + return 0; + } + if (rendcirc && (rendcirc->base_.purpose == CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED)) { log_info(LD_REND, |