summaryrefslogtreecommitdiff
path: root/test/socket
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-30 00:40:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-30 00:40:54 +0000
commit643f5308e683334aceb2db9656b61f577579effb (patch)
treea46f00d374faecd58eaa1822b4c8632072628831 /test/socket
parentbd89d0cba5a20a2d2f76c4d98e3e70553973c7e7 (diff)
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
Diffstat (limited to 'test/socket')
-rw-r--r--test/socket/test_addrinfo.rb2
1 files changed, 2 insertions, 0 deletions
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