| @@ 422-426 (lines=5) @@ | ||
| 419 | $i = ArrayUtils::pickRandom( $readLoads ); |
|
| 420 | } |
|
| 421 | ||
| 422 | if ( $i > 0 ) { |
|
| 423 | $ok = $this->doWait( $i, true, $timeout ); |
|
| 424 | } else { |
|
| 425 | $ok = true; // no applicable loads |
|
| 426 | } |
|
| 427 | ||
| 428 | return $ok; |
|
| 429 | } |
|
| @@ 437-439 (lines=3) @@ | ||
| 434 | ||
| 435 | $ok = true; |
|
| 436 | for ( $i = 1; $i < $serverCount; $i++ ) { |
|
| 437 | if ( $this->mLoads[$i] > 0 ) { |
|
| 438 | $ok = $this->doWait( $i, true, $timeout ) && $ok; |
|
| 439 | } |
|
| 440 | } |
|
| 441 | ||
| 442 | return $ok; |
|