X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/227b4293647d51244771d16f0ad14bc94a2b3ad9..a1b1c1ea3adb864c8c2e3feb4eaed890a9b505cf:/src/redis-benchmark.c?ds=sidebyside diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 1be4c07d..d95bfd8e 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -201,7 +201,10 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) { if (config.requests_finished < config.requests) config.latency[config.requests_finished++] = c->latency; c->pending--; - if (c->pending == 0) clientDone(c); + if (c->pending == 0) { + clientDone(c); + break; + } } else { break; }