From a7780fb671f12d3c79e7150054acb6e0b35825cb Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 21 Dec 2016 06:40:24 -0800 Subject: [PATCH] set connect timeout --- lib/HTTPCurl.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/HTTPCurl.php b/lib/HTTPCurl.php index 7ecfad4..5e72b15 100644 --- a/lib/HTTPCurl.php +++ b/lib/HTTPCurl.php @@ -73,6 +73,7 @@ class HTTPCurl { } curl_setopt($ch, CURLOPT_TIMEOUT_MS, round($this->timeout * 1000)); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); } public static function error_string_from_code($code) {