rdbms: Remove obsolete comment in LoadBalancerSingle
[lhc/web/wiklou.git] / includes / libs / rdbms / loadbalancer / LoadBalancerSingle.php
index 2161b66..a3e57ae 100644 (file)
@@ -26,7 +26,7 @@ namespace Wikimedia\Rdbms;
 use InvalidArgumentException;
 
 /**
- * Trivial LoadBalancer that always returns an injected connection handle
+ * Trivial LoadBalancer that always returns an injected connection handle.
  */
 class LoadBalancerSingle extends LoadBalancer {
        /** @var IDatabase */
@@ -55,7 +55,8 @@ class LoadBalancerSingle extends LoadBalancer {
                        'trxProfiler' => $params['trxProfiler'] ?? null,
                        'srvCache' => $params['srvCache'] ?? null,
                        'wanCache' => $params['wanCache'] ?? null,
-                       'localDomain' => $params['localDomain'] ?? $this->db->getDomainID()
+                       'localDomain' => $params['localDomain'] ?? $this->db->getDomainID(),
+                       'readOnlyReason' => $params['readOnlyReason'] ?? false,
                ] );
 
                if ( isset( $params['readOnlyReason'] ) ) {
@@ -80,6 +81,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
+       }
 }
 
 /**