提交 55024e9a 编写于 作者: A antirez

Sentinel: don't set announce-ip if is empty.

上级 3cc31da3
......@@ -1433,7 +1433,8 @@ char *sentinelHandleConfiguration(char **argv, int argc) {
if (argc == 5) si->runid = sdsnew(argv[4]);
} else if (!strcasecmp(argv[0],"announce-ip") && argc == 2) {
/* announce-ip <ip-address> */
sentinel.announce_ip = sdsnew(argv[1]);
if (strlen(argv[1]))
sentinel.announce_ip = sdsnew(argv[1]);
} else if (!strcasecmp(argv[0],"announce-port") && argc == 2) {
/* announce-port <port> */
sentinel.announce_port = atoi(argv[1]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册