mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
add timeout for curl
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
c5a1a00e38
commit
1ce496a323
1 changed files with 2 additions and 0 deletions
|
|
@ -303,6 +303,8 @@ class ConfigurationManager
|
||||||
$testUrl = $protocol . $domain . ':443';
|
$testUrl = $protocol . $domain . ':443';
|
||||||
curl_setopt($ch, CURLOPT_URL, $testUrl);
|
curl_setopt($ch, CURLOPT_URL, $testUrl);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||||
|
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||||
$response = (string)curl_exec($ch);
|
$response = (string)curl_exec($ch);
|
||||||
# Get rid of trailing \n
|
# Get rid of trailing \n
|
||||||
$response = str_replace("\n", "", $response);
|
$response = str_replace("\n", "", $response);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue