add a couple of more ways to short-circuit the tr_stat.desiredAvailable test in tr_torrentStat(), as suggested by BentMyWookie
This commit is contained in:
parent
5ed97a1c04
commit
f3db37ab1b
|
@ -741,7 +741,7 @@ tr_torrentStat( tr_torrent * tor )
|
||||||
s->haveUnchecked = tr_cpHaveTotal( tor->completion ) - s->haveValid;
|
s->haveUnchecked = tr_cpHaveTotal( tor->completion ) - s->haveValid;
|
||||||
|
|
||||||
|
|
||||||
if( !s->leftUntilDone )
|
if( !s->leftUntilDone || !tor->isRunning || !s->peersConnected )
|
||||||
s->desiredAvailable = 0;
|
s->desiredAvailable = 0;
|
||||||
else {
|
else {
|
||||||
tr_piece_index_t i;
|
tr_piece_index_t i;
|
||||||
|
|
Loading…
Reference in New Issue