Skip to content

Commit a080b73

Browse files
committed
Fix unix-socket detection logic broken in 418428f
1 parent fdada7a commit a080b73

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
@@ -1812,7 +1812,7 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock)
18121812
schema = estrndup(address, pos - address);
18131813
address = pos + sizeof("://") - 1;
18141814
}
1815-
if (redis_sock->port < 1) {
1815+
if (address[0] == '/' && redis_sock->port < 1) {
18161816
host_len = snprintf(host, sizeof(host), "unix://%s", address);
18171817
usocket = 1;
18181818
} else {

0 commit comments

Comments
 (0)