1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/webrick] Allow EPROTOTYPE error when writing junk to a socket

MacOS seems to raise this error in some cases.

https://github.com/ruby/webrick/commit/0f0c9f1e61
This commit is contained in:
Jeremy Evans 2020-07-26 07:46:13 -07:00 committed by Hiroshi SHIBATA
parent b8fdd38b2e
commit 0fe6461148

View file

@ -484,7 +484,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase
TCPSocket.open(addr, port) do |c|
c.write("GET / HTTP/1.0\r\n")
junk = -"X-Junk: #{' ' * 1024}\r\n"
assert_raise(Errno::ECONNRESET, Errno::EPIPE) do
assert_raise(Errno::ECONNRESET, Errno::EPIPE, Errno::EPROTOTYPE) do
loop { c.write(junk) }
end
end