avoid some calculations of piece availability if there are no peers
This commit is contained in:
parent
7d569e7981
commit
60d0c333ff
|
@ -1348,7 +1348,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
have = MAX_PIECES;
|
have = MAX_PIECES;
|
||||||
avail = 0;
|
avail = 0;
|
||||||
}
|
}
|
||||||
else if (![self isActive])
|
else if (![self isActive] || [self totalPeers] <= 0)
|
||||||
{
|
{
|
||||||
have = rintf((float)MAX_PIECES * [self progress]);
|
have = rintf((float)MAX_PIECES * [self progress]);
|
||||||
avail = 0;
|
avail = 0;
|
||||||
|
|
Loading…
Reference in New Issue