diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-09 00:29:48 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-09 00:29:48 +0000 |
commit | 687637e280158f773d87e14896566f532338d293 (patch) | |
tree | d6667240741eef84ac943c1e08e2aaf777d334f2 /lib/net | |
parent | 233a94b91e918b999135cf374de984d132246848 (diff) |
* lib/net/imap.rb (disconnect): call shutdown for
SSLSocket. Thanks, Technorama Ltd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/imap.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 547e23e618..59df778695 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -284,7 +284,11 @@ module Net # Disconnects from the server. def disconnect - @sock.shutdown unless @usessl + if SSL::SSLSocket === @sock + @sock.io.shutdown + else + @sock.shutdown + end @receiver_thread.join @sock.close end |