aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connect.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 309ba355a..2a1876e71 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -907,11 +907,6 @@ singleipconnect(struct connectdata *conn,
Curl_persistconninfo(conn);
-#ifdef ENABLE_IPV6
- if(addr.family == AF_INET6)
- conn->bits.ipv6 = TRUE;
-#endif
-
if(data->set.tcp_nodelay)
tcpnodelay(conn, sockfd);
@@ -999,6 +994,10 @@ singleipconnect(struct connectdata *conn,
/* we are connected, awesome! */
*connected = TRUE; /* this is a true connect */
infof(data, "connected\n");
+#ifdef ENABLE_IPV6
+ conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE;
+#endif
+
Curl_updateconninfo(conn, sockfd);
*sockp = sockfd;
return CURLE_OK;