Skip to content

Commit 333cbc2

Browse files
Alexey Ponomarevbjori
authored andcommitted
CDRIVER-1972 Support for ipv6 hostnames
For cases when connection endpoint specified as hostname with ipv6 address only.
1 parent d25c2c6 commit 333cbc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongoc/mongoc-uri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mongoc_uri_append_host (mongoc_uri_t *uri,
102102
} else {
103103
bson_snprintf (link_->host_and_port, sizeof link_->host_and_port,
104104
"%s:%hu", host, port);
105-
link_->family = strstr (host, ".sock") ? AF_UNIX : AF_INET;
105+
link_->family = strstr (host, ".sock") ? AF_UNIX : AF_UNSPEC;
106106
}
107107
link_->host_and_port[sizeof link_->host_and_port - 1] = '\0';
108108
link_->port = port;

0 commit comments

Comments
 (0)