mirror of
https://github.com/transmission/transmission
synced 2025-01-03 21:45:49 +00:00
address dirty/save sequencing issue in prev commit
This commit is contained in:
parent
08f5a0fdaa
commit
5082393d92
1 changed files with 11 additions and 13 deletions
|
@ -2318,23 +2318,21 @@ void tr_torrentRecheckCompleteness(tr_torrent* tor)
|
|||
|
||||
fireCompletenessChange(tor, completeness, wasRunning);
|
||||
|
||||
if (tr_torrentIsSeed(tor))
|
||||
if (tr_torrentIsSeed(tor) && wasLeeching && wasRunning)
|
||||
{
|
||||
if (wasLeeching && wasRunning)
|
||||
{
|
||||
/* if completeness was TR_LEECH then the seed limit check will have been skipped in bandwidthPulse */
|
||||
tr_torrentCheckSeedLimit(tor);
|
||||
}
|
||||
|
||||
if (tr_sessionIsTorrentDoneScriptEnabled(tor->session))
|
||||
{
|
||||
tr_torrentSave(tor);
|
||||
|
||||
torrentCallScript(tor, tr_sessionGetTorrentDoneScript(tor->session));
|
||||
}
|
||||
/* if completeness was TR_LEECH, the seed limit check
|
||||
will have been skipped in bandwidthPulse */
|
||||
tr_torrentCheckSeedLimit(tor);
|
||||
}
|
||||
|
||||
tr_torrentSetDirty(tor);
|
||||
|
||||
if (tr_torrentIsSeed(tor) && tr_sessionIsTorrentDoneScriptEnabled(tor->session))
|
||||
{
|
||||
tr_torrentSave(tor);
|
||||
|
||||
torrentCallScript(tor, tr_sessionGetTorrentDoneScript(tor->session));
|
||||
}
|
||||
}
|
||||
|
||||
tr_torrentUnlock(tor);
|
||||
|
|
Loading…
Reference in a new issue