| @@ 418-422 (lines=5) @@ | ||
| 415 | $i = ArrayUtils::pickRandom( $readLoads ); |
|
| 416 | } |
|
| 417 | ||
| 418 | if ( $i > 0 ) { |
|
| 419 | $ok = $this->doWait( $i, true, $timeout ); |
|
| 420 | } else { |
|
| 421 | $ok = true; // no applicable loads |
|
| 422 | } |
|
| 423 | ||
| 424 | return $ok; |
|
| 425 | } |
|
| @@ 433-435 (lines=3) @@ | ||
| 430 | ||
| 431 | $ok = true; |
|
| 432 | for ( $i = 1; $i < $serverCount; $i++ ) { |
|
| 433 | if ( $this->mLoads[$i] > 0 ) { |
|
| 434 | $ok = $this->doWait( $i, true, $timeout ) && $ok; |
|
| 435 | } |
|
| 436 | } |
|
| 437 | ||
| 438 | return $ok; |
|