Skip to content

Commit

Permalink
only try to parse endpoints if there is something to parse
Browse files Browse the repository at this point in the history
otherwise, lets try to avoid parsing "" as "0.0.0.0:0", as that doesnt make sense.
  • Loading branch information
guss77 committed Jan 29, 2020
1 parent e767e59 commit 9aa77c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daemon/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,10 @@ static int redis_hash_get_endpoint(struct endpoint *out, const struct redis_hash

if (redis_hash_get_str(&s, h, k))
return -1;
if (endpoint_parse_any(out, s.s))
return -1;
if (s.len) {
if (endpoint_parse_any(out, s.s))
return -1;
}

return 0;
}
Expand Down

0 comments on commit 9aa77c5

Please sign in to comment.