From: Tim Starling Date: Wed, 25 Apr 2007 07:42:14 +0000 (+0000) Subject: Remove slave servers from rotation if the slave thread is not running on them X-Git-Tag: 1.31.0-rc.0~53238 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=f4488f8ca071359785ea85ce2b1375be7928593c;p=lhc%2Fweb%2Fwiklou.git Remove slave servers from rotation if the slave thread is not running on them --- diff --git a/includes/LoadBalancer.php b/includes/LoadBalancer.php index d3d072eed3..4ebe26c708 100644 --- a/includes/LoadBalancer.php +++ b/includes/LoadBalancer.php @@ -95,7 +95,9 @@ class LoadBalancer { # Unset excessively lagged servers $lags = $this->getLagTimes(); foreach ( $lags as $i => $lag ) { - if ( isset( $this->mServers[$i]['max lag'] ) && $lag > $this->mServers[$i]['max lag'] ) { + if ( $i != 0 && isset( $this->mServers[$i]['max lag'] ) && + ( $lag === false || $lag > $this->mServers[$i]['max lag'] ) ) + { unset( $loads[$i] ); } }