summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-01 15:43:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-01 15:43:21 +0000
commit8c55a0a6e4936306c2abb62a33517e4b9fb6fcc2 (patch)
treefd0924fb6875f3471adb1fcde5e6b39021e4c0bf
parent2fef15145c4a4a9d3d62062f6aae0e342fa50807 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/ipsocket.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 122a50c74b2..6a269011920 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 2 00:39:59 2013 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/ipsocket.c (init_inetsock_internal): Don't try mismached
+ address family if already failed.
+
Mon Jul 1 23:07:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
* template/encdb.h.tmpl: define encoding index macros to use the index
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index a146797dda0..7b198bd1547 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. */