diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 4efed4b12..18e19b0e0 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -1182,8 +1182,8 @@ static int fetchClusterConfiguration() { } if (myself) { node = firstNode; - if (node->ip == NULL && ip != NULL) { - node->ip = ip; + if (ip != NULL && strcmp(node->ip, ip) != 0) { + node->ip = sdsnew(ip); node->port = port; } } else {