We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd56cab commit f995de4Copy full SHA for f995de4
src/class-tiny-compress-client.php
@@ -36,7 +36,8 @@ class Tiny_Compress_Client extends Tiny_Compress {
36
* @since 3.6.8
37
* @var int
38
*/
39
- const API_TIMEOUT = 300;
+ const API_TIMEOUT = 120;
40
+ const CONNECT_TIMEOUT = 8;
41
42
private $last_error_code = 0;
43
private $last_message = '';
@@ -186,7 +187,7 @@ private function set_request_options( $client ) {
186
187
188
// Set API request timeout to prevent indefinite hanging
189
$options[ CURLOPT_TIMEOUT ] = self::API_TIMEOUT;
- $options[ CURLOPT_CONNECTTIMEOUT ] = self::API_TIMEOUT;
190
+ $options[ CURLOPT_CONNECTTIMEOUT ] = self::CONNECT_TIMEOUT;
191
192
if ( TINY_DEBUG ) {
193
$file = fopen( dirname( __FILE__ ) . '/curl.log', 'w' );
0 commit comments