[Bug #463] `Errno::ENOTCONN: Socket is not connected' in test/net/http

Bug #463: `Errno::ENOTCONN: Socket is not connected’ in test/net/http
http://redmine.ruby-lang.org/issues/show/463

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

Mac OS Xe$B$G0J2<$N$h$&$Ke(BErrno::ENOTCONNe$B$K$J$j$^$9!#e(B
e$B$=$N1F6A$GB>$N%F%9%H$N$$$/$D$+$be(BErrno::EADDRINUSEe$B$J$I$G<:GT$7$^$9!#e(B

  1. Error:
    test_certificate_verify_failure(TestNetHTTPS):
    Errno::ENOTCONN: Socket is not connected
    /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/.ext/common/openssl/ssl.rb:157:in
    shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/.ext/common/openssl/ssl.rb:157:inshutdown’
    /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:133:in
    block in shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:128:ineach’
    /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:128:in
    shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/net/http/utils.rb:34:inteardown’

e$B0J2<$N%Q%C%A$GD>$k$h$&$J$N$G$9$,LdBj$J$$$G$7$g$&$+e(B?

Index: lib/webrick/server.rb

— lib/webrick/server.rb (revision 18748)
+++ lib/webrick/server.rb (working copy)
@@ -130,9 +130,17 @@
addr = s.addr
@logger.debug(“close TCPSocket(#{addr[2]}, #{addr[1]})”)
end

  •    s.shutdown
    
  •    unless @config[:ShutdownSocketWithoutClose]
    
  •    begin
    
  •      s.shutdown
    
  •    rescue Errno::ENOTCONN
    
  •      # when `Errno::ENOTCONN: Socket is not connected' on some 
    

platforms,

  •      # call #close instead of #shutdown.
    
  •      # (ignore @config[:ShutdownSocketWithoutClose])
         s.close
    
  •    else
    
  •      unless @config[:ShutdownSocketWithoutClose]
    
  •        s.close
    
  •      end
       end
     }
     @listeners.clear

e$B%A%1%C%He(B #463 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/463

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs