1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

(trunk libT) #2199: DHT should not announce stopped torrents

This commit is contained in:
Charles Kerr 2009-06-11 21:42:59 +00:00
parent ebfd93fe7b
commit 17cb7945ed
2 changed files with 3 additions and 1 deletions

View file

@ -1274,6 +1274,8 @@ torrentStart( tr_torrent * tor, int reloadProgress )
if( !isVerifying ) if( !isVerifying )
tr_verifyAdd( tor, checkAndStartCB ); tr_verifyAdd( tor, checkAndStartCB );
tor->dhtAnnounceAt = time( NULL ) tr_cryptoWeakRandInt( 20 );
} }
tr_globalUnlock( tor->session ); tr_globalUnlock( tor->session );

View file

@ -979,7 +979,7 @@ trackerPulse( void * vsession )
if( tor->dhtAnnounceAt <= now ) { if( tor->dhtAnnounceAt <= now ) {
int rc = 1; int rc = 1;
if( tr_torrentAllowsDHT(tor) ) if( tor->isRunning && tr_torrentAllowsDHT(tor) )
rc = tr_dhtAnnounce(tor, 1); rc = tr_dhtAnnounce(tor, 1);
if(rc == 0) if(rc == 0)
/* The DHT is not ready yet. Try again soon. */ /* The DHT is not ready yet. Try again soon. */