From 643f5308e683334aceb2db9656b61f577579effb Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 30 Oct 2012 00:40:54 +0000 Subject: [PATCH] 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 --- test/socket/test_addrinfo.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb index 8870fe5e3d..5bd7e2ab84 100644 --- a/test/socket/test_addrinfo.rb +++ b/test/socket/test_addrinfo.rb @@ -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