From daaff484a6d6e2f132dea2091cc4d3e8cb629cf3 Mon Sep 17 00:00:00 2001 From: artix Date: Tue, 5 Feb 2019 19:18:25 +0100 Subject: [PATCH] Redis Benchmark: use atomic var for liveclients in 'createClient' --- src/redis-benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 8e38265f2..4722b84aa 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -658,7 +658,7 @@ static client createClient(char *cmd, size_t len, client from, int thread_id) { if (config.idlemode == 0) aeCreateFileEvent(el,c->context->fd,AE_WRITABLE,writeHandler,c); listAddNodeTail(config.clients,c); - config.liveclients++; + atomicIncr(config.liveclients, 1); return c; }