Explorar el Código

Add support for the 'connection_timeout' parameter with WebdisConnection.

Daniele Alessandri hace 13 años
padre
commit
b85bc00880
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      lib/Predis/Network/WebdisConnection.php

+ 1 - 0
lib/Predis/Network/WebdisConnection.php

@@ -61,6 +61,7 @@ class WebdisConnection implements IConnectionSingle {
 
     private function initializeCurl(IConnectionParameters $parameters) {
         $options = array(
+            CURLOPT_CONNECTTIMEOUT_MS => $parameters->connection_timeout * 1000,
             CURLOPT_URL => "{$parameters->scheme}://{$parameters->host}:{$parameters->port}",
             CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
             CURLOPT_POST => true,