Merge branch 'bug20963_032' into maint-0.3.2

This commit is contained in:
Nick Mathewson 2017-11-17 08:34:05 -05:00
commit 0684e6c6f0
2 changed files with 12 additions and 3 deletions

4
changes/bug20963 Normal file
View File

@ -0,0 +1,4 @@
o Minor features (logging):
- Improve the message we log when re-enabling circuit build timeouts
after having received a consensus. Closes ticket 20963.

View File

@ -431,9 +431,14 @@ circuit_build_times_new_consensus_params(circuit_build_times_t *cbt,
if (num > 0) { if (num > 0) {
if (num != cbt->liveness.num_recent_circs) { if (num != cbt->liveness.num_recent_circs) {
int8_t *recent_circs; int8_t *recent_circs;
log_notice(LD_CIRC, "The Tor Directory Consensus has changed how many " if (cbt->liveness.num_recent_circs > 0) {
"circuits we must track to detect network failures from %d " log_notice(LD_CIRC, "The Tor Directory Consensus has changed how "
"to %d.", cbt->liveness.num_recent_circs, num); "many circuits we must track to detect network failures "
"from %d to %d.", cbt->liveness.num_recent_circs, num);
} else {
log_notice(LD_CIRC, "Upon receiving a consensus directory, "
"re-enabling circuit-based network failure detection.");
}
tor_assert(cbt->liveness.timeouts_after_firsthop || tor_assert(cbt->liveness.timeouts_after_firsthop ||
cbt->liveness.num_recent_circs == 0); cbt->liveness.num_recent_circs == 0);