From 9f5f5986262072addc102d1e2a5ad28d6a8f80c2 Mon Sep 17 00:00:00 2001 From: lnu Date: Sat, 30 Apr 2005 16:04:41 +0000 Subject: fixed a problem when an error occured while disconnecting from IMAP git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@24 f70e237a-67f3-0310-a06c-d2b8a7116972 --- lib/feed2imap/feed2imap.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb index 1df93bd..348f414 100644 --- a/lib/feed2imap/feed2imap.rb +++ b/lib/feed2imap/feed2imap.rb @@ -27,7 +27,7 @@ require 'logger' require 'thread' # Feed2Imap version -F2I_VERSION = '0.2' +F2I_VERSION = '0.3' class Feed2Imap def initialize(verbose, cacherebuild, configfile) @@ -146,10 +146,12 @@ class Feed2Imap @logger.fatal("Exception caught while writing cache to #{@config.cache}: #{$!}") end @logger.info("Closing IMAP connections") - begin - @config.imap_accounts.each_value { |ac| ac.disconnect } - rescue - @logger.fatal("Exception caught while closing connection to #{ac.to_s}: #{$!}") + @config.imap_accounts.each_value do |ac| + begin + ac.disconnect + rescue + @logger.fatal("Exception caught while closing connection to #{ac.to_s}: #{$!}") + end end end end -- cgit v1.2.3-70-g09d2