aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-19 14:38:04 -0500
committerNick Mathewson <nickm@torproject.org>2013-02-19 15:02:08 -0500
commit3340d3279de0bb411c506a759778ee7a9b45165b (patch)
tree139e0dbfba7f0fd52f4ea5115771d5d80e829927 /src/or/connection_edge.c
parentf2199763cf7c57744a885c12afcfa7b9df304629 (diff)
downloadtor-3340d3279de0bb411c506a759778ee7a9b45165b.tar.gz
tor-3340d3279de0bb411c506a759778ee7a9b45165b.zip
Downgrade an assert to LD_BUG
This should prevent crashes on further recurrence of 8065, and help diagnose such if they occur
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index b4fa3e6fe2..abde2e19f2 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -651,7 +651,16 @@ connection_ap_expire_beginning(void)
}
continue;
}
- tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
+ if (circ->purpose != CIRCUIT_PURPOSE_C_GENERAL) {
+ log_warn(LD_BUG, "circuit->purpose == CIRCUIT_PURPOSE_C_GENERAL failed. "
+ "The purpose on the circuit was %s; it was in state %s, "
+ "path_state %s.",
+ circuit_purpose_to_string(circ->purpose),
+ circuit_state_to_string(circ->state),
+ CIRCUIT_IS_ORIGIN(circ) ?
+ pathbias_state_to_string(TO_ORIGIN_CIRCUIT(circ)->path_state) :
+ "none");
+ }
log_fn(cutoff < 15 ? LOG_INFO : severity, LD_APP,
"We tried for %d seconds to connect to '%s' using exit %s."
" Retrying on a new circuit.",