Quellcode durchsuchen

Make multiple explicit calls to Predis\Client::connect() possible.

Daniele Alessandri vor 14 Jahren
Ursprung
Commit
b3e7cfe408
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3 1
      lib/Predis.php

+ 3 - 1
lib/Predis.php

@@ -123,7 +123,9 @@ class Client {
     }
 
     public function connect() {
-        $this->_connection->connect();
+        if (!$this->_connection->isConnected()) {
+            $this->_connection->connect();
+        }
     }
 
     public function disconnect() {