Set curl connect timeout to 5s
This commit is contained in:
parent
b2ae61dffd
commit
77ac2958b8
1 changed files with 1 additions and 0 deletions
|
|
@ -98,6 +98,7 @@ abstract class PatchBase {
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Patchbot/1.0; +http://www.patchbot.de/)');
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Patchbot/1.0; +http://www.patchbot.de/)');
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||||
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
||||||
foreach ($opts as $opt)
|
foreach ($opts as $opt)
|
||||||
curl_setopt($ch, $opt[0], $opt[1]);
|
curl_setopt($ch, $opt[0], $opt[1]);
|
||||||
if ($opt = HostOption::get(parse_url($url, PHP_URL_HOST)))
|
if ($opt = HostOption::get(parse_url($url, PHP_URL_HOST)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue