Browse Source

Add support for the 'connection_timeout' parameter with WebdisConnection.

Daniele Alessandri 13 years ago
parent
commit
b85bc00880
1 changed files with 1 additions and 0 deletions
  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,