fix Curl::load timeout error

This commit is contained in:
salam committed 2026-01-17 15:20:51 +01:00
1 parent 30003b7d3d
commit c3c8f6a393
7 files changed
+18 -6

No files matched your search

+2 -2
View File
@@ -70,7 +70,7 @@ class Curl
public static function fetch_data_with_retries($url, $_config = [], $max_retries = 3)
{
$attempt = 0;
$timeout = 10; // seconds
$timeout = 5; // seconds
$connect_timeout = 5; // seconds
$debug = Nuh::$options['d'] ?? 0;
@@ -136,7 +136,7 @@ class Curl
echo "All attempts failed.\n";
curl_close($ch);
return null; // Return null if all retries fail
return json_encode(['no data']); // Return null if all retries fail
}
public static function curlerrorcode($id)