mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
avoid some calculations of piece availability if there are no peers
This commit is contained in:
parent
7d569e7981
commit
60d0c333ff
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue