TrackerBackoff
object TrackerBackoff
The exponential failure back-off libtorrent applies between failed announces, ported from announce_infohash::failed (src/announce_entry.cpp). Exposed as a pure helper so the session's announce loop can compute the next-announce instant without duplicating the formula. The loop owns when to call it; this just does the arithmetic.
Properties
Functions
Link copied to clipboard
fun nextDelaySecs(fails: Int, backoffRatio: Int = DEFAULT_BACKOFF_RATIO, retryIntervalSecs: Int = 0): Long
The seconds to wait before the next announce after fails consecutive failures, porting libtorrent's max(retry_interval, min(tracker_retry_delay_max, tracker_retry_delay_min + fails² * tracker_retry_delay_min * backoff_ratio / 100)).