]> git.saurik.com Git - redis.git/commitdiff
Merge pull request #707 from NanXiao/patch-1
authorSalvatore Sanfilippo <antirez@gmail.com>
Wed, 10 Oct 2012 09:18:14 +0000 (02:18 -0700)
committerSalvatore Sanfilippo <antirez@gmail.com>
Wed, 10 Oct 2012 09:18:14 +0000 (02:18 -0700)
Update src/redis-benchmark.c

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;
             }