calculateOptimalBatch can return values larger than maxBatch

Xon

Well-known member
Affected version
2.2.15
I noticed that the $maxBatch sometimes doesn't apply if the $done value is larger than the expected for whatever reason.

PHP:
public function calculateOptimalBatch($expected, $done, $start, $maxTime, $maxBatch = null)
{
...
    if ($percentSpent > 1)
    {
        return max(1, $newExpected);
    }
 
Top Bottom