aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php')
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php
index 665f029a79d..c5b80a7f57f 100644
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php
+++ b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Curl/CurlMultiProxy.php
@@ -15,13 +15,16 @@ class CurlMultiProxy extends AbstractHasDispatcher implements CurlMultiInterface
protected $groups = array();
protected $queued = array();
protected $maxHandles;
+ protected $selectTimeout;
/**
- * @param int $maxHandles The maximum number of idle CurlMulti handles to allow to remain open
+ * @param int $maxHandles The maximum number of idle CurlMulti handles to allow to remain open
+ * @param float $selectTimeout timeout for curl_multi_select
*/
- public function __construct($maxHandles = 3)
+ public function __construct($maxHandles = 3, $selectTimeout = 1.0)
{
$this->maxHandles = $maxHandles;
+ $this->selectTimeout = $selectTimeout;
// You can get some weird "Too many open files" errors when sending a large amount of requests in parallel.
// These two statements autoload classes before a system runs out of file descriptors so that you can get back
// valuable error messages if you run out.
@@ -122,7 +125,7 @@ class CurlMultiProxy extends AbstractHasDispatcher implements CurlMultiInterface
}
// All are claimed, so create one
- $handle = new CurlMulti();
+ $handle = new CurlMulti($this->selectTimeout);
$handle->setEventDispatcher($this->getEventDispatcher());
$this->handles[] = $handle;