diff options
author | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2006-02-09 17:36:35 +0000 |
---|---|---|
committer | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2006-02-09 17:36:35 +0000 |
commit | 23e3173f242db2e4a2867ae27ea4c3a22b085a8e (patch) | |
tree | 9e6c7325f13b05833a4e87aee3814de55bf4d3f6 /lib | |
parent | 07202f62da21ecf978496f4bec7f97522f2fbe75 (diff) | |
download | feed2imap-23e3173f242db2e4a2867ae27ea4c3a22b085a8e.tar.gz feed2imap-23e3173f242db2e4a2867ae27ea4c3a22b085a8e.tar.bz2 feed2imap-23e3173f242db2e4a2867ae27ea4c3a22b085a8e.zip |
another try
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@81 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to '')
-rw-r--r-- | lib/feed2imap/feed2imap.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb index a8fd1fb..c7d8a2a 100644 --- a/lib/feed2imap/feed2imap.rb +++ b/lib/feed2imap/feed2imap.rb @@ -102,8 +102,7 @@ class Feed2Imap ths = [] mutex = Mutex::new @config.feeds.each do |f| - ths << Thread::new do - url = f.url + ths << Thread::new(f) do begin mutex.lock lastcheck = @cache.get_last_check(f.name) @@ -126,11 +125,11 @@ class Feed2Imap end rescue Timeout::Error mutex.synchronize do - @logger.fatal("Timeout::Error while fetching #{url}: #{$!}") + @logger.fatal("Timeout::Error while fetching #{f.url}: #{$!}") end rescue mutex.synchronize do - @logger.fatal("Error while fetching #{url}: #{$!}") + @logger.fatal("Error while fetching #{f.url}: #{$!}") end end end |