[Bug #464] `Errno::ENOTCONN: Socket is not connected' in test/openssl/test_ssl.rb

Bug #464: `Errno::ENOTCONN: Socket is not connected’ in
test/openssl/test_ssl.rb
http://redmine.ruby-lang.org/issues/show/464

e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$BC4Ev<Te(B: GOTOU Yuuzou

test/openssl/test_ssl.rbe$B$G$bF1MM$Ke(BErrno::ENOTCONNe$B$K$J$j$^$9!#e(B

  1. Error:
    test_client_auth(OpenSSL::TestSSL):
    Errno::ENOTCONN: Socket is not connected
    /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/openssl/test_ssl.rb:132:in
    shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/openssl/test_ssl.rb:132:in start_server’
    /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/openssl/test_ssl.rb:231:in
    `test_client_auth’

e$B0J2<%Q%C%A$G$9!#e(B

Index: test/openssl/test_ssl.rb

— test/openssl/test_ssl.rb (revision 18748)
+++ test/openssl/test_ssl.rb (working copy)
@@ -129,7 +129,14 @@
block.call(server, port.to_i)
ensure
begin

  •    tcps.shutdown if (tcps)
    
  •    begin
    
  •      tcps.shutdown
    
  •    rescue Errno::ENOTCONN
    
  •      # when `Errno::ENOTCONN: Socket is not connected' on some 
    

platforms,

  •      # call #close instead of #shutdown.
    
  •      tcps.close
    
  •      tcps = nil
    
  •    end if (tcps)
       if (server)
         server.join(5)
         if server.alive?
    

e$B%A%1%C%He(B #464 e$B$,99?7$5$l$^$7$?!#e(B (by Kazuhiro NISHIYAMA)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B

r18777

http://redmine.ruby-lang.org/issues/show/464