diff options
author | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2005-04-30 16:04:41 +0000 |
---|---|---|
committer | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2005-04-30 16:04:41 +0000 |
commit | 9f5f5986262072addc102d1e2a5ad28d6a8f80c2 (patch) | |
tree | 29c31a0b63bf45c0d745f0a84ab1145a00250e17 /lib/feed2imap | |
parent | 8496be23f915dfc8ac6b97ce333b8d512b9941b1 (diff) | |
download | feed2imap-9f5f5986262072addc102d1e2a5ad28d6a8f80c2.tar.gz feed2imap-9f5f5986262072addc102d1e2a5ad28d6a8f80c2.tar.bz2 feed2imap-9f5f5986262072addc102d1e2a5ad28d6a8f80c2.zip |
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
Diffstat (limited to '')
-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 |