diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2019-09-25 10:26:32 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2019-09-25 10:26:32 +0300 |
commit | 3d8b85259c47bc9fac69a6a0a20dc1d5a35c4a3a (patch) | |
tree | 7d138f813607a2bfaf33a96ab98c840eacce26c8 /library.c | |
parent | 92b3f5d7824ddf31c06cd3a785e24b466ea7dc0b (diff) |
Use negative port number to indicate unix socket
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1807,7 +1807,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 (redis_sock->port < 0) { host_len = snprintf(host, sizeof(host), "unix://%s", address); usocket = 1; } else { |