Skip to content

Commit

Permalink
Fix unix-socket detection logic broken in 418428f
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Sep 29, 2019
1 parent fdada7a commit a080b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock)
schema = estrndup(address, pos - address);
address = pos + sizeof("://") - 1;
}
if (redis_sock->port < 1) {
if (address[0] == '/' && redis_sock->port < 1) {
host_len = snprintf(host, sizeof(host), "unix://%s", address);
usocket = 1;
} else {
Expand Down

0 comments on commit a080b73

Please sign in to comment.