aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-07 11:05:57 -0500
committerNick Mathewson <nickm@torproject.org>2016-11-07 11:05:57 -0500
commit89edef6afbfc701fab5a8ce1f3d7399f7c3261c7 (patch)
tree2b729eee73bd3900662f58b5cd2e37dc4c7a035c /src
parent1934bf75ef753e437aa60fe466312017840dd737 (diff)
downloadtor-89edef6afbfc701fab5a8ce1f3d7399f7c3261c7.tar.gz
tor-89edef6afbfc701fab5a8ce1f3d7399f7c3261c7.zip
Treat bacoff/schedule mismatch as a bug.
Diffstat (limited to 'src')
-rw-r--r--src/or/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 452571f2a7..6a681ef23b 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -4055,7 +4055,7 @@ download_status_schedule_get_delay(download_status_t *dls,
delay = *(int *)smartlist_get(schedule, smartlist_len(schedule) - 1);
} else if (dls->backoff == DL_SCHED_RANDOM_EXPONENTIAL) {
/* Check if we missed a reset somehow */
- if (dls->last_backoff_position > dls_schedule_position) {
+ IF_BUG_ONCE(dls->last_backoff_position > dls_schedule_position) {
dls->last_backoff_position = 0;
dls->last_delay_used = 0;
}