Skip to content

Commit

Permalink
FIX: Use the second ip when it is 127.0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
namsic committed Oct 26, 2022
1 parent fd91c5a commit 8ec471a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arcus_zk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,8 +1188,7 @@ static int get_zk_client_ipport(char *startp, char *endp, char *buf) {
clientp++;

colonp = memchr(clientp, ':', endp - clientp);
if (colonp && strncmp(clientp, "0.0.0.0", colonp - clientp) != 0
&& strncmp(clientp, "127.0.0.1", colonp - clientp) != 0) {
if (colonp && strncmp(clientp, "0.0.0.0", colonp - clientp) != 0) {
memcpy(buf, clientp, endp - clientp);
return endp - clientp;
}
Expand Down

0 comments on commit 8ec471a

Please sign in to comment.