@@ -105,8 +105,6 @@ public function __construct(IOInterface $io, Config $config, array $options = []
105
105
}
106
106
}
107
107
108
- curl_multi_setopt ($ mh , CURLMOPT_MAX_HOST_CONNECTIONS , 8 );
109
-
110
108
if (function_exists ('curl_share_init ' )) {
111
109
$ this ->shareHandle = $ sh = curl_share_init ();
112
110
curl_share_setopt ($ sh , CURLSHOPT_SHARE , CURL_LOCK_DATA_COOKIE );
@@ -147,7 +145,7 @@ private function initDownload(callable $resolve, callable $reject, string $origi
147
145
$ attributes = array_merge ([
148
146
'retryAuthFailure ' => true ,
149
147
'redirects ' => 0 ,
150
- 'retries ' => 3 ,
148
+ 'retries ' => 0 ,
151
149
'storeAuth ' => false ,
152
150
'ipResolve ' => null ,
153
151
], $ attributes );
@@ -196,13 +194,12 @@ private function initDownload(callable $resolve, callable $reject, string $origi
196
194
curl_setopt ($ curlHandle , CURLOPT_STDERR , fopen ('php://stdout ' , 'w ' ));
197
195
curl_setopt ($ curlHandle , CURLOPT_URL , $ url );
198
196
curl_setopt ($ curlHandle , CURLOPT_FOLLOWLOCATION , false );
199
- curl_setopt ($ curlHandle , CURLOPT_CONNECTTIMEOUT , 300 );
200
- curl_setopt ($ curlHandle , CURLOPT_TIMEOUT , 300 );
197
+ curl_setopt ($ curlHandle , CURLOPT_CONNECTTIMEOUT , 10 );
198
+ curl_setopt ($ curlHandle , CURLOPT_TIMEOUT , max (( int ) ini_get ( " default_socket_timeout " ), 300 ) );
201
199
curl_setopt ($ curlHandle , CURLOPT_WRITEHEADER , $ headerHandle );
202
200
curl_setopt ($ curlHandle , CURLOPT_FILE , $ bodyHandle );
203
201
curl_setopt ($ curlHandle , CURLOPT_ENCODING , "" );
204
202
curl_setopt ($ curlHandle , CURLOPT_PROTOCOLS , CURLPROTO_HTTP | CURLPROTO_HTTPS );
205
- curl_setopt ($ curlHandle , CURLOPT_SSLVERSION , CURL_SSLVERSION_MAX_TLSv1_2);
206
203
207
204
if ($ attributes ['ipResolve ' ] === 4 ) {
208
205
curl_setopt ($ curlHandle , CURLOPT_IPRESOLVE , CURL_IPRESOLVE_V4 );
0 commit comments