aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-03-07 16:05:15 -0800
committerzotlabs <mike@macgirvin.com>2019-03-07 16:05:15 -0800
commitd961cf21fb7ef13b196b37d79eac55899187d68f (patch)
tree7fa419bdc925c5f2ab8eef65a5e28ea4ab3b01dc /include/network.php
parent1f7622e4c42bf71d1d38dd88c40c903d83a8d6c0 (diff)
parent04fe7e61deb19b9b05c87bff037b7bbf1d7bc662 (diff)
downloadvolse-hubzilla-d961cf21fb7ef13b196b37d79eac55899187d68f.tar.gz
volse-hubzilla-d961cf21fb7ef13b196b37d79eac55899187d68f.tar.bz2
volse-hubzilla-d961cf21fb7ef13b196b37d79eac55899187d68f.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/network.php b/include/network.php
index 8ac71011e..12f2ad4e9 100644
--- a/include/network.php
+++ b/include/network.php
@@ -114,6 +114,13 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
@curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
}
+ if(x($opts,'connecttimeout') && intval($opts['connecttimeout'])) {
+ @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, intval($opts['connecttimeout']));
+ }
+ else {
+ $curl_contime = intval(@get_config('system','curl_connecttimeout'));
+ @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (($curl_contime !== false) ? $curl_contime : 30));
+ }
if(x($opts,'http_auth')) {
// "username" . ':' . "password"