提交 c6db326d 编写于 作者: A antirez

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.
上级 4456ee11
......@@ -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. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册