Browse Source

Reorder resume data saving conditionals

Having conditionals which can break saving of torrent resume data
in order from more likely to less likely is more effective.
adaptive-webui-19844
Vladimir Golovnev (Glassez) 6 years ago
parent
commit
7716a27d0d
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 4
      src/base/bittorrent/session.cpp

4
src/base/bittorrent/session.cpp

@ -2350,9 +2350,9 @@ void Session::generateResumeData(bool final) @@ -2350,9 +2350,9 @@ void Session::generateResumeData(bool final)
{
foreach (TorrentHandle *const torrent, m_torrents) {
if (!torrent->isValid()) continue;
if (torrent->hasMissingFiles()) continue;
if (torrent->isChecking() || torrent->hasError()) continue;
if (torrent->isChecking()) continue;
if (!final && !torrent->needSaveResumeData()) continue;
if (torrent->hasMissingFiles() || torrent->hasError()) continue;
saveTorrentResumeData(torrent, final);
}

Loading…
Cancel
Save