diff --git a/src/Composer/Util/Http/CurlDownloader.php b/src/Composer/Util/Http/CurlDownloader.php index f511f17d3519..f55d5188fdbd 100644 --- a/src/Composer/Util/Http/CurlDownloader.php +++ b/src/Composer/Util/Http/CurlDownloader.php @@ -20,6 +20,7 @@ use Composer\Util\AuthHelper; use Composer\Util\Url; use Composer\Util\HttpDownloader; +use Composer\Util\ProcessExecutor; use React\Promise\Promise; /** @@ -160,7 +161,7 @@ private function initDownload($resolve, $reject, $origin, $url, $options, $copyT curl_setopt($curlHandle, CURLOPT_URL, $url); curl_setopt($curlHandle, CURLOPT_FOLLOWLOCATION, false); curl_setopt($curlHandle, CURLOPT_CONNECTTIMEOUT, 10); - curl_setopt($curlHandle, CURLOPT_TIMEOUT, 300); + curl_setopt($curlHandle, CURLOPT_TIMEOUT, ProcessExecutor::getTimeout()); curl_setopt($curlHandle, CURLOPT_WRITEHEADER, $headerHandle); curl_setopt($curlHandle, CURLOPT_FILE, $bodyHandle); curl_setopt($curlHandle, CURLOPT_ENCODING, "gzip");