]> git.saurik.com Git - redis.git/blobdiff - src/redis-benchmark.c
Update src/redis-benchmark.c
[redis.git] / src / redis-benchmark.c
index 1be4c07d913dcee9937b90c2f1457e6d32d8f966..d95bfd8ea817f1452aac8a731bcd332fe9ceb813 100644 (file)
@@ -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;
             }