summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/ipsocket.c2
1 files changed, 1 insertions, 1 deletions
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. */