timeout on varnish purger

This commit is contained in:
Shish 2015-09-20 16:46:49 +01:00
parent ffc636515f
commit ba3a61052f

View file

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