From 8c55a0a6e4936306c2abb62a33517e4b9fb6fcc2 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 1 Jul 2013 15:43:21 +0000 Subject: * ext/socket/ipsocket.c (init_inetsock_internal): Don't try mismached address family if already failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/ipsocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/socket/ipsocket.c') diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c index a146797dda..7b198bd154 100644 --- a/ext/socket/ipsocket.c +++ b/ext/socket/ipsocket.c @@ -69,7 +69,7 @@ init_inetsock_internal(struct inetsock_arg *arg) break; } if (!lres) { - if (res->ai_next) + if (res->ai_next || status < 0) continue; /* Use a different family local address if no choice, this * will cause EAFNOSUPPORT. */ -- cgit v1.2.3