Skip to content

Commit 3ad2ace

Browse files
committed
PHPC-508: Construct valid stream URI for IPv6 literals
1 parent a062f2d commit 3ad2ace

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

php_phongo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,8 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
10871087
switch (host->family) {
10881088
#if defined(AF_INET6)
10891089
case AF_INET6:
1090+
dsn_len = spprintf(&dsn, 0, "tcp://[%s]:%d", host->host, host->port);
1091+
break;
10901092
#endif
10911093
case AF_INET:
10921094
dsn_len = spprintf(&dsn, 0, "tcp://%s:%d", host->host, host->port);

0 commit comments

Comments
 (0)