mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
(trunk, libT) #5146 'seeding complete callback called twice' -- fixed with patch from x190.
This commit is contained in:
parent
317185750c
commit
ccb4a16ab8
1 changed files with 3 additions and 3 deletions
|
@ -440,7 +440,7 @@ tr_torrentCheckSeedLimit (tr_torrent * tor)
|
|||
{
|
||||
assert (tr_isTorrent (tor));
|
||||
|
||||
if (!tor->isRunning || !tr_torrentIsSeed (tor))
|
||||
if (!tor->isRunning || tor->isStopping || !tr_torrentIsSeed (tor))
|
||||
return;
|
||||
|
||||
/* if we're seeding and reach our seed ratio limit, stop the torrent */
|
||||
|
@ -2061,6 +2061,8 @@ tr_torrentRecheckCompleteness (tr_torrent * tor)
|
|||
tor->completeness = completeness;
|
||||
tr_fdTorrentClose (tor->session, tor->uniqueId);
|
||||
|
||||
fireCompletenessChange (tor, completeness, wasRunning);
|
||||
|
||||
if (tr_torrentIsSeed (tor))
|
||||
{
|
||||
if (recentChange)
|
||||
|
@ -2085,8 +2087,6 @@ tr_torrentRecheckCompleteness (tr_torrent * tor)
|
|||
torrentCallScript (tor, tr_sessionGetTorrentDoneScript (tor->session));
|
||||
}
|
||||
|
||||
fireCompletenessChange (tor, completeness, wasRunning);
|
||||
|
||||
tr_torrentSetDirty (tor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue