if stop ratio is infinity and there is a ratio to stop at, stop

This commit is contained in:
Mitchell Livingston 2007-04-07 21:08:00 +00:00
parent fbcc6c73dc
commit e6ad008831
1 changed files with 3 additions and 2 deletions

View File

@ -289,8 +289,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
}
//check to stop for ratio
float stopRatio;
if ([self isSeeding] && (stopRatio = [self actualStopRatio]) != INVALID && [self ratio] >= stopRatio)
float stopRatio, ratio;
if ([self isSeeding] && (stopRatio = [self actualStopRatio]) != INVALID
&& ((ratio = [self ratio]) >= stopRatio || ratio == TR_RATIO_INF))
{
[self stopTransfer];
fStat = tr_torrentStat(fHandle);