1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

avoid some calculations of piece availability if there are no peers

This commit is contained in:
Mitchell Livingston 2007-02-14 02:05:46 +00:00
parent 7d569e7981
commit 60d0c333ff

View file

@ -1348,7 +1348,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
have = MAX_PIECES;
avail = 0;
}
else if (![self isActive])
else if (![self isActive] || [self totalPeers] <= 0)
{
have = rintf((float)MAX_PIECES * [self progress]);
avail = 0;