From: Tim Starling Date: Sat, 14 Oct 2006 06:49:22 +0000 (+0000) Subject: Skip load balancing stuff if there is only one server X-Git-Tag: 1.31.0-rc.0~55497 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=19ae05f99957c13ec0fd3a7c4f2575a9decb8155;p=lhc%2Fweb%2Fwiklou.git Skip load balancing stuff if there is only one server --- diff --git a/includes/LoadBalancer.php b/includes/LoadBalancer.php index 3e81aea941..3690b43a1e 100644 --- a/includes/LoadBalancer.php +++ b/includes/LoadBalancer.php @@ -141,6 +141,9 @@ class LoadBalancer { $i = false; if ( $this->mForce >= 0 ) { $i = $this->mForce; + } elseif ( count( $this->mServers ) == 1 ) { + # Skip the load balancing if there's only one server + $i = 0; } else { if ( $this->mReadIndex >= 0 ) { $i = $this->mReadIndex;