Kaynağa Gözat

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

Daniele Alessandri 14 yıl önce
ebeveyn
işleme
b3e7cfe408
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  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() {