From 19ae05f99957c13ec0fd3a7c4f2575a9decb8155 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 14 Oct 2006 06:49:22 +0000 Subject: [PATCH] Skip load balancing stuff if there is only one server --- includes/LoadBalancer.php | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.20.1