Actions
Bug #463
closed`Errno::ENOTCONN: Socket is not connected' in test/net/http
Description
=begin
Mac OS Xで以下のようにErrno::ENOTCONNになります。
その影響で他のテストのいくつかもErrno::EADDRINUSEなどで失敗します。
- 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:inshutdown' /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/lib/webrick/server.rb:133:inblock in shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:128:in
each'
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:128:inshutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/net/http/utils.rb:34:in
teardown'
以下のパッチで直るようなのですが問題ないでしょうか?
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
=end
Updated by znz (Kazuhiro NISHIYAMA) about 16 years ago
- Status changed from Open to Closed
=begin
r18777
=end
Actions
Like0
Like0