diff options
Diffstat (limited to 'lib/feed2imap')
-rw-r--r-- | lib/feed2imap/feed2imap.rb | 12 |
1 files changed, 7 insertions, 5 deletions
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 |