mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
merge revision(s) 18368:
* lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for environments without OpenSSL. backported from trunk. fixed [ruby-dev:35755]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d458cea640
commit
375cd73c20
3 changed files with 14 additions and 6 deletions
|
@ -284,9 +284,11 @@ module Net
|
|||
|
||||
# Disconnects from the server.
|
||||
def disconnect
|
||||
if SSL::SSLSocket === @sock
|
||||
begin
|
||||
# try to call SSL::SSLSocket#io.
|
||||
@sock.io.shutdown
|
||||
else
|
||||
rescue NoMethodError
|
||||
# @sock is not an SSL::SSLSocket.
|
||||
@sock.shutdown
|
||||
end
|
||||
@receiver_thread.join
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue