From b8a613351f042574de1eff8a9b403501e2cef146 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 11 Jul 2013 11:21:19 +0200 Subject: increase timeout to from 10 to 60 seconds, fix #278 --- utility/feedfetcher.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utility') diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php index cd3308cff..fc301b31e 100644 --- a/utility/feedfetcher.php +++ b/utility/feedfetcher.php @@ -41,6 +41,7 @@ class FeedFetcher implements IFeedFetcher { private $cacheDuration; private $faviconFetcher; private $simplePieFactory; + private $fetchTimeout; private $time; private $purifier; @@ -50,6 +51,7 @@ class FeedFetcher implements IFeedFetcher { TimeFactory $time, $cacheDirectory, $cacheDuration, + $fetchTimeout, $purifier){ $this->api = $api; $this->cacheDirectory = $cacheDirectory; @@ -58,6 +60,7 @@ class FeedFetcher implements IFeedFetcher { $this->simplePieFactory = $simplePieFactory; $this->time = $time; $this->purifier = $purifier; + $this->fetchTimeout = $fetchTimeout; } @@ -79,6 +82,7 @@ class FeedFetcher implements IFeedFetcher { $simplePie = $this->simplePieFactory->getCore(); $simplePie->set_feed_url($url); $simplePie->enable_cache(true); + $simplePie->set_timeout($this->fetchTimeout); $simplePie->set_cache_location($this->cacheDirectory); $simplePie->set_cache_duration($this->cacheDuration); -- cgit v1.2.3