mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Merge pull request #2307 from nextcloud/enh/noid/add-curl-timeout
add timeout for curl
This commit is contained in:
commit
916a25a62e
1 changed files with 2 additions and 0 deletions
|
|
@ -303,6 +303,8 @@ class ConfigurationManager
|
|||
$testUrl = $protocol . $domain . ':443';
|
||||
curl_setopt($ch, CURLOPT_URL, $testUrl);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
$response = (string)curl_exec($ch);
|
||||
# Get rid of trailing \n
|
||||
$response = str_replace("\n", "", $response);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue