Skip to content

Commit 15cc228

Browse files
committed
back-port fix issue in retrying trackers in tiers > 0
back-port #7331
1 parent 9ab80b8 commit 15cc228

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* back-port fix issue in retrying trackers in tiers > 0
2+
13
1.2.20 released
24

35
* validate add_torrent_params::save_path at run-time

src/torrent.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9176,13 +9176,18 @@ bool is_downloading_state(int const st)
91769176
if (state.done) continue;
91779177

91789178
if (settings().get_bool(settings_pack::announce_to_all_tiers)
9179+
&& !settings().get_bool(settings_pack::announce_to_all_trackers)
91799180
&& state.found_working
91809181
&& t.tier <= state.tier
91819182
&& state.tier != INT_MAX)
91829183
continue;
91839184

9184-
if (t.tier > state.tier && !settings().get_bool(settings_pack::announce_to_all_tiers)) break;
9185-
if (aep.is_working()) { state.tier = t.tier; state.found_working = false; }
9185+
if (t.tier > state.tier)
9186+
{
9187+
if (!settings().get_bool(settings_pack::announce_to_all_tiers)) break;
9188+
state.found_working = false;
9189+
}
9190+
state.tier = t.tier;
91869191
if (aep.fails >= t.fail_limit && t.fail_limit != 0) continue;
91879192
if (!aep.enabled) continue;
91889193

@@ -9204,8 +9209,7 @@ bool is_downloading_state(int const st)
92049209
else
92059210
{
92069211
time_point32 const next_tracker_announce = std::max(aep.next_announce, aep.min_announce);
9207-
if (next_tracker_announce < next_announce
9208-
&& (!state.found_working || aep.is_working()))
9212+
if (next_tracker_announce < next_announce)
92099213
next_announce = next_tracker_announce;
92109214
}
92119215
if (aep.is_working()) state.found_working = true;

0 commit comments

Comments
 (0)