Check if there is no error before reconnect [Bug #4387]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd89d0cba5
commit
643f5308e6
@ -159,6 +159,8 @@ class TestSocketAddrinfo < Test::Unit::TestCase
|
|||||||
s2.connect_nonblock(ai)
|
s2.connect_nonblock(ai)
|
||||||
rescue IO::WaitWritable
|
rescue IO::WaitWritable
|
||||||
IO.select(nil, [s2])
|
IO.select(nil, [s2])
|
||||||
|
r = s2.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
|
||||||
|
assert_equal(0, r.int, "NOERROR is expected but #{r.inspect}")
|
||||||
begin
|
begin
|
||||||
s2.connect_nonblock(ai)
|
s2.connect_nonblock(ai)
|
||||||
rescue Errno::EISCONN
|
rescue Errno::EISCONN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user