1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Don't break torrent checking

This commit is contained in:
Vladimir Golovnev (Glassez) 2019-07-14 11:50:44 +03:00
parent 9462685c78
commit 87d98403f4
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7

View File

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