|
@@ -3770,7 +3770,10 @@ find_dl_min_and_max_delay(download_status_t *dls, const or_options_t *options,
|
|
|
const smartlist_t *schedule = find_dl_schedule(dls, options);
|
|
|
tor_assert(schedule != NULL && smartlist_len(schedule) >= 2);
|
|
|
*min = *((int *)(smartlist_get(schedule, 0)));
|
|
|
- *max = *((int *)((smartlist_get(schedule, smartlist_len(schedule) - 1))));
|
|
|
+ if (dls->backoff == DL_SCHED_DETERMINISTIC)
|
|
|
+ *max = *((int *)((smartlist_get(schedule, smartlist_len(schedule) - 1))));
|
|
|
+ else
|
|
|
+ *max = INT_MAX;
|
|
|
}
|
|
|
|
|
|
/** Advance one delay step. The algorithm is to use the previous delay to
|