Skip to content

Commit

Permalink
Use modern for loop in BandwidthManager::relativeDownloadDelayTimerEx…
Browse files Browse the repository at this point in the history
…pired

getFileJobSigned-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and backportbot-nextcloud[bot] committed May 15, 2023
1 parent 52b4a7d commit c7fae27
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/libsync/bandwidthmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,13 @@ void BandwidthManager::relativeDownloadDelayTimerExpired()
_relativeLimitCurrentMeasuredJob->setChoked(false);

// choke all other download jobs
Q_FOREACH (GETFileJob *gfj, _downloadJobList) {
if (gfj != _relativeLimitCurrentMeasuredJob) {
gfj->setBandwidthLimited(true);
gfj->setChoked(true);
for (const auto getFileJob : _downloadJobList) {
if (getFileJob == _relativeLimitCurrentMeasuredJob) {
continue;
}

getFileJob->setBandwidthLimited(true);
getFileJob->setChoked(true);
}

// now we're in measuring state
Expand Down

0 comments on commit c7fae27

Please sign in to comment.