diff options
author | Chimrod <contact+git@chimrod.com> | 2011-08-30 15:47:18 +0200 |
---|---|---|
committer | Chimrod <contact+git@chimrod.com> | 2011-08-30 15:47:18 +0200 |
commit | dd474b72f01ca9ac3b431d0592cb10c19dee6415 (patch) | |
tree | 26e93517d3e38ca83aa9da83c3dcc8e10ba89967 /lib/feed2imap/feed2imap.rb | |
parent | 5ff5b6d733136936af1789793e66d84df15731d5 (diff) | |
download | feed2imap-dd474b72f01ca9ac3b431d0592cb10c19dee6415.tar.gz feed2imap-dd474b72f01ca9ac3b431d0592cb10c19dee6415.tar.bz2 feed2imap-dd474b72f01ca9ac3b431d0592cb10c19dee6415.zip |
Set timeout for feed fetching
Diffstat (limited to 'lib/feed2imap/feed2imap.rb')
-rw-r--r-- | lib/feed2imap/feed2imap.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb index b938a39..acfb56e 100644 --- a/lib/feed2imap/feed2imap.rb +++ b/lib/feed2imap/feed2imap.rb @@ -121,7 +121,9 @@ class Feed2Imap end fetch_start = Time::now if feed.url - s = HTTPFetcher::fetch(feed.url, @cache.get_last_check(feed.name)) + fetcher = HTTPFetcher::new + fetcher::timeout = @config.timeout + s = fetcher::fetch(feed.url, @cache.get_last_check(feed.name)) elsif feed.execurl # avoid running more than one command at the same time. # We need it because the called command might not be |