Provide correct type as input for LoadMonitor::postConnectionBackoff()
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Sat, 11 Jan 2014 08:36:34 +0000 (09:36 +0100)
committerSiebrand <siebrand@wikimedia.org>
Sat, 11 Jan 2014 08:37:56 +0000 (08:37 +0000)
float is expected, bool was given.

Change-Id: I046cc4b73166e79905e3556365f567420a4cabb9

includes/db/LoadBalancer.php

index 7a49c78..c388718 100644 (file)
@@ -276,7 +276,7 @@ class LoadBalancer {
 
                                // Perform post-connection backoff
                                $threshold = isset( $this->mServers[$i]['max threads'] )
-                                       ? $this->mServers[$i]['max threads'] : false;
+                                       ? $this->mServers[$i]['max threads'] : 0;
                                $backoff = $this->getLoadMonitor()->postConnectionBackoff( $conn, $threshold );
 
                                // Decrement reference counter, we are finished with this connection.