Browse Source

Don't break torrent checking

adaptive-webui-19844
Vladimir Golovnev (Glassez) 5 years ago
parent
commit
87d98403f4
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 7
      src/base/bittorrent/torrenthandle.cpp

7
src/base/bittorrent/torrenthandle.cpp

@ -1437,6 +1437,12 @@ void TorrentHandle::toggleFirstLastPiecePriority() @@ -1437,6 +1437,12 @@ void TorrentHandle::toggleFirstLastPiecePriority()
void TorrentHandle::pause()
{
if (m_startupState != Started) return;
if (m_pauseWhenReady) return;
if (isChecking()) {
m_pauseWhenReady = true;
return;
}
if (isPaused()) return;
setAutoManaged(false);
@ -1453,6 +1459,7 @@ void TorrentHandle::resume(bool forced) @@ -1453,6 +1459,7 @@ void TorrentHandle::resume(bool forced)
{
if (m_startupState != Started) return;
m_pauseWhenReady = false;
resume_impl(forced);
}

Loading…
Cancel
Save