mirror of https://github.com/aria2/aria2
Merge f93b946ca4
into b519ce04e3
commit
15551087ec
|
@ -109,12 +109,17 @@ void AnnounceList::announceSuccess()
|
|||
if (currentTrackerInitialized_) {
|
||||
(*currentTier_)->nextEvent();
|
||||
auto url = *currentTracker_;
|
||||
(*currentTier_)->urls.erase(currentTracker_);
|
||||
currentTracker_ = (*currentTier_)->urls.erase(currentTracker_);
|
||||
(*currentTier_)->urls.push_front(std::move(url));
|
||||
if (currentTracker_ == std::end((*currentTier_)->urls)) {
|
||||
++currentTier_;
|
||||
if (currentTier_ == std::end(tiers_)) {
|
||||
currentTier_ = std::begin(tiers_);
|
||||
}
|
||||
currentTracker_ = std::begin((*currentTier_)->urls);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AnnounceList::announceFailure()
|
||||
{
|
||||
|
|
|
@ -95,8 +95,9 @@ public:
|
|||
/**
|
||||
* Removes current announce URL from its group and inserts it before the
|
||||
* first element of the group.
|
||||
* The internal announce group pointer points to the first element of the
|
||||
* first group after this call.
|
||||
* The internal announce group pointer points to the next element.
|
||||
* If the current URL is the last element of its group, then the first
|
||||
* element of the next group is pointed.
|
||||
*/
|
||||
void announceSuccess();
|
||||
|
||||
|
|
Loading…
Reference in New Issue