summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/rubyimap.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/feed2imap/rubyimap.rb b/lib/feed2imap/rubyimap.rb
index e564b8d..4e43f60 100644
--- a/lib/feed2imap/rubyimap.rb
+++ b/lib/feed2imap/rubyimap.rb
@@ -284,7 +284,11 @@ module Net
# Disconnects from the server.
def disconnect
- @sock.shutdown unless @usessl
+ if @usessl
+ @sock.to_io.shutdown
+ else
+ @sock.shutdown
+ end
@receiver_thread.join
@sock.close
end