mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Bandwidth: Fix issue with removed download jobs
The measuring broke when a job that is currently measuring was removed.
This commit is contained in:
parent
3f5887cc03
commit
92ce707268
1 changed files with 5 additions and 0 deletions
|
@ -118,6 +118,7 @@ void BandwidthManager::unregisterUploadDevice(UploadDevice* p)
|
|||
_relativeUploadDeviceList.removeAll(p);
|
||||
if (p == _relativeLimitCurrentMeasuredDevice) {
|
||||
_relativeLimitCurrentMeasuredDevice = 0;
|
||||
_relativeUploadLimitProgressAtMeasuringRestart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,6 +143,10 @@ void BandwidthManager::registerDownloadJob(GETFileJob* j)
|
|||
void BandwidthManager::unregisterDownloadJob(GETFileJob* j)
|
||||
{
|
||||
_downloadJobList.removeAll(j);
|
||||
if (_relativeLimitCurrentMeasuredJob == j) {
|
||||
_relativeLimitCurrentMeasuredJob = 0;
|
||||
_relativeDownloadLimitProgressAtMeasuringRestart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void BandwidthManager::unregisterDownloadJob(QObject* o)
|
||||
|
|
Loading…
Reference in a new issue