Skip to content

Commit 3d8b852

Browse files
committed
Use negative port number to indicate unix socket
1 parent 92b3f5d commit 3d8b852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock)
18071807
schema = estrndup(address, pos - address);
18081808
address = pos + sizeof("://") - 1;
18091809
}
1810-
if (redis_sock->port < 1) {
1810+
if (redis_sock->port < 0) {
18111811
host_len = snprintf(host, sizeof(host), "unix://%s", address);
18121812
usocket = 1;
18131813
} else {

0 commit comments

Comments
 (0)