summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/redis-benchmark.c4
1 files changed, 2 insertions, 2 deletions
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 {