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);