1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

(trunk libT) in tr_torrentCheckSeedRadio(), make sure to check & see if the torrent is running ;)

This commit is contained in:
Charles Kerr 2009-03-02 03:18:03 +00:00
parent 3ffbb31774
commit 6f994f6708

View file

@ -2135,7 +2135,7 @@ tr_torrentCheckSeedRatio( tr_torrent * tor )
assert( tr_isTorrent( tor ) ); assert( tr_isTorrent( tor ) );
/* if we're seeding and we've reached our seed ratio limit, stop the torrent */ /* if we're seeding and we've reached our seed ratio limit, stop the torrent */
if( tr_torrentIsSeed( tor ) && tr_torrentGetSeedRatio( tor, &seedRatio ) ) if( tor->isRunning && tr_torrentIsSeed( tor ) && tr_torrentGetSeedRatio( tor, &seedRatio ) )
{ {
const uint64_t up = tor->uploadedCur + tor->uploadedPrev; const uint64_t up = tor->uploadedCur + tor->uploadedPrev;
uint64_t down = tor->downloadedCur + tor->downloadedPrev; uint64_t down = tor->downloadedCur + tor->downloadedPrev;