diff options
author | antirez <antirez@gmail.com> | 2013-12-23 11:31:35 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-12-23 11:34:15 +0100 |
commit | c6db326d1d96c29d828f5b40cfd76896e6548775 (patch) | |
tree | bac93197d6c6e7ae3522296b63a2ad40b15e4c51 | |
parent | 4456ee11734872fcab676ff439784ce94070d5a5 (diff) | |
download | redis-c6db326d1d96c29d828f5b40cfd76896e6548775.tar.gz |
Configuring port to 0 disables IP socket as specified.
This was no longer the case with 2.8 becuase of a bug introduced with
the IPv6 support. Now it is fixed.
This fixes issue #1287 and #1477.
-rw-r--r-- | src/redis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/redis.c b/src/redis.c index 5fb75cd63..0ad08e8c8 100644 --- a/src/redis.c +++ b/src/redis.c @@ -1523,7 +1523,8 @@ void initServer() { server.db = zmalloc(sizeof(redisDb)*server.dbnum); /* Open the TCP listening socket for the user commands. */ - if (listenToPort(server.port,server.ipfd,&server.ipfd_count) == REDIS_ERR) + if (server.port != 0 && + listenToPort(server.port,server.ipfd,&server.ipfd_count) == REDIS_ERR) exit(1); /* Open the listening Unix domain socket. */ |