Explorar el Código

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

Daniele Alessandri hace 14 años
padre
commit
b3e7cfe408
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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() {