From 77ac2958b87663a484864112a0a1d015fd779db3 Mon Sep 17 00:00:00 2001 From: Steffen Lange Date: Wed, 14 Apr 2021 12:20:01 +0200 Subject: [PATCH] Set curl connect timeout to 5s --- PatchBase.php | 1 + 1 file changed, 1 insertion(+) diff --git a/PatchBase.php b/PatchBase.php index 9efb71e..37f48cd 100644 --- a/PatchBase.php +++ b/PatchBase.php @@ -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_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); foreach ($opts as $opt) curl_setopt($ch, $opt[0], $opt[1]); if ($opt = HostOption::get(parse_url($url, PHP_URL_HOST)))