summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/net/imap.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 7e8d574fbe..705d54b0ce 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -289,6 +289,11 @@ module Net
@sock.close
end
+ # Returns true if disconnected from the server.
+ def disconnected?
+ return @sock.closed?
+ end
+
# Sends a CAPABILITY command, and returns an array of
# capabilities that the server supports. Each capability
# is a string. See [IMAP] for a list of possible