소스 검색

Do not check for the existence of a UNIX domain socket file in userland.

Now Predis throws an instance of Predis\ConnectionException when trying to
connect to an instance of Redis on a non-existent UNIX domain socket file.
Daniele Alessandri 14 년 전
부모
커밋
101fffbabe
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      lib/Predis/Network/ConnectionBase.php

+ 1 - 5
lib/Predis/Network/ConnectionBase.php

@@ -30,13 +30,9 @@ abstract class ConnectionBase implements IConnectionSingle {
     protected function checkParameters(IConnectionParameters $parameters) {
         switch ($parameters->scheme) {
             case 'unix':
-                $pathToSocket = $parameters->path;
-                if (!isset($pathToSocket)) {
+                if (!isset($parameters->path)) {
                     throw new InvalidArgumentException('Missing UNIX domain socket path');
                 }
-                if (!file_exists($pathToSocket)) {
-                    throw new InvalidArgumentException("Could not find $pathToSocket");
-                }
             case 'tcp':
                 return $parameters;
             default: