Skip to content

Commit

Permalink
Sentinel: don't set announce-ip if is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Sep 4, 2014
1 parent c9437fe commit 0a6cbab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sentinel.c
Expand Up @@ -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]);
Expand Down

0 comments on commit 0a6cbab

Please sign in to comment.