Add timeout setting for cURL requests in CheckIP method
This commit is contained in:
@@ -532,6 +532,7 @@ class AwtrixSettings extends IPSModule {
|
|||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_HTTPGET, true);
|
curl_setopt($ch, CURLOPT_HTTPGET, true);
|
||||||
|
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 2500);
|
||||||
|
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
$error = curl_error($ch);
|
$error = curl_error($ch);
|
||||||
|
|||||||
Reference in New Issue
Block a user