rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
883 stars 210 forks source link

Respect min interval returned by the tracker for failed announces #246

Open kannibalox opened 10 months ago

kannibalox commented 10 months ago

This changes the default values for the base class to 0, and relies on the successful parsing of an announce to set them to something sane. If the interval can't be parsed during a failure (from an unrelated failure or just the keys missing), it fails back to the original backoff behavior. However, in order to accommodate the previous logic without modifying the ABI, the backoff timeout is capped at 299 seconds instead of 320.

Fixes #1215