From ba3a61052f5b6b57b2279aa965531544b83f155b Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 20 Sep 2015 16:46:49 +0100 Subject: [PATCH] timeout on varnish purger --- ext/varnish/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/varnish/main.php b/ext/varnish/main.php index de9ce60d..c80e670d 100644 --- a/ext/varnish/main.php +++ b/ext/varnish/main.php @@ -11,8 +11,9 @@ class VarnishPurger extends Extension { private function curl_purge($path) { $url = make_http(make_link($path)); $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL,$url); + curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PURGE"); + curl_setopt($ch, CURLOPT_TIMEOUT, 5); $result = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch);