diff options
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index dd200e105f..15e705048b 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -810,10 +810,13 @@ circuit_build_failed(origin_circuit_t *circ) n_conn->_base.address, n_conn->_base.port); n_conn->is_bad_for_new_circs = 1; } - entry_guard_register_connect_status(n_conn_id, 0, time(NULL)); - /* if there are any one-hop streams waiting on this circuit, fail - * them now so they can retry elsewhere. */ - connection_ap_fail_onehop(n_conn_id, circ->build_state); + if (circ->_base.n_hop) { + const char *n_conn_id = circ->_base.n_hop->identity_digest; + entry_guard_register_connect_status(n_conn_id, 0, time(NULL)); + /* if there are any one-hop streams waiting on this circuit, fail + * them now so they can retry elsewhere. */ + connection_ap_fail_onehop(n_conn_id, circ->build_state); + } } switch (circ->_base.purpose) { |