summaryrefslogtreecommitdiff
path: root/lib/feed2imap/imap.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/imap.rb5
1 files changed, 4 insertions, 1 deletions
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