소스 검색

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

Daniele Alessandri 14 년 전
부모
커밋
b3e7cfe408
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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() {