mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 2 additions and 0 deletions
|
@ -159,6 +159,8 @@ class TestSocketAddrinfo < Test::Unit::TestCase
|
|||
s2.connect_nonblock(ai)
|
||||
rescue IO::WaitWritable
|
||||
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
|
||||
s2.connect_nonblock(ai)
|
||||
rescue Errno::EISCONN
|
||||
|
|
Loading…
Reference in a new issue