rdbms: do not close the connection in LoadBalancerSingle::__destruct
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 16 Jun 2019 23:20:55 +0000 (00:20 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 16 Jun 2019 23:29:11 +0000 (23:29 +0000)
The connection instance is injected unlike with the parent class,
meaning that it does not own the connection. No-op the method.

Change-Id: I61914b986619f201ac9cc8c94d46873a3b9e8177

includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php

index fcddfcf..4c68833 100644 (file)
@@ -86,6 +86,10 @@ class LoadBalancerSingle extends LoadBalancer {
        protected function reallyOpenConnection( array $server, DatabaseDomain $domain ) {
                return $this->db;
        }
+
+       public function __destruct() {
+               // do nothing since the connection was injected
+       }
 }
 
 /**