diff options
Diffstat (limited to 'src/redis-benchmark.c')
-rw-r--r-- | src/redis-benchmark.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 4efed4b12..a955c0d4c 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -59,6 +59,7 @@ #include "crc16_slottable.h" #include "hdr_histogram.h" #include "cli_common.h" +#include "mt19937-64.h" #define UNUSED(V) ((void) V) #define RANDPTR_INITIAL_SIZE 8 @@ -1182,8 +1183,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 { @@ -1677,6 +1678,7 @@ int main(int argc, const char **argv) { client c; srandom(time(NULL) ^ getpid()); + init_genrand64(ustime() ^ getpid()); signal(SIGHUP, SIG_IGN); signal(SIGPIPE, SIG_IGN); |