Browse Source

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 13 years ago
parent
commit
101fffbabe
1 changed files with 1 additions and 5 deletions
  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: