summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-12-03 21:24:08 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-12-03 21:24:08 +0000
commit7b028b844046e20f8fea391e14d75ede1fc5bc38 (patch)
tree5e92bc54f8d7104f56382bd11a8421dba6ce8af9 /lib
parentf713b3f673c8968ad6dd2b272947eb844697d07b (diff)
downloadfeed2imap-7b028b844046e20f8fea391e14d75ede1fc5bc38.tar.gz
feed2imap-7b028b844046e20f8fea391e14d75ede1fc5bc38.tar.bz2
feed2imap-7b028b844046e20f8fea391e14d75ede1fc5bc38.zip
fixed small bug during disconnections
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@118 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/feed2imap.rb1
-rw-r--r--lib/feed2imap/imap.rb5
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb
index 72743f5..a2474be 100644
--- a/lib/feed2imap/feed2imap.rb
+++ b/lib/feed2imap/feed2imap.rb
@@ -232,7 +232,6 @@ class Feed2Imap
@logger.info("Closing IMAP connections ...")
@config.imap_accounts.each_value do |ac|
begin
- ac.logout
ac.disconnect
rescue
# servers tend to cause an exception to be raised here, hence the INFO level.
diff --git a/lib/feed2imap/imap.rb b/lib/feed2imap/imap.rb
index 038833b..933a561 100644
--- a/lib/feed2imap/imap.rb
+++ b/lib/feed2imap/imap.rb
@@ -77,7 +77,10 @@ class ImapAccount
# disconnect from the IMAP server
def disconnect
- @connection.disconnect if @connection
+ if @connection
+ @connection.logout
+ @connection.disconnect
+ end
end
# Returns true if the folder exist