mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
#5407: In tr_peerMgrGetDesiredAvailable()
, check if swarm is running (suggested by x190)
This commit is contained in:
parent
7d30ad3ff6
commit
de304e8a35
1 changed files with 3 additions and 8 deletions
|
@ -2619,17 +2619,12 @@ tr_peerMgrGetDesiredAvailable (const tr_torrent * tor)
|
|||
|
||||
/* common shortcuts... */
|
||||
|
||||
if (!tor->isRunning || tor->isStopping)
|
||||
return 0;
|
||||
|
||||
if (tr_torrentIsSeed (tor))
|
||||
return 0;
|
||||
|
||||
if (!tr_torrentHasMetadata (tor))
|
||||
if (!tor->isRunning || tor->isStopping ||
|
||||
tr_torrentIsSeed (tor) || !tr_torrentHasMetadata (tor))
|
||||
return 0;
|
||||
|
||||
s = tor->swarm;
|
||||
if (s == NULL)
|
||||
if (s == NULL || !s->isRunning)
|
||||
return 0;
|
||||
|
||||
n = tr_ptrArraySize (&s->peers);
|
||||
|
|
Loading…
Reference in a new issue