]> git.saurik.com Git - redis.git/commitdiff
redis-benchmark hopefully last bug with multi bulk reply fixed
authorantirez <antirez@gmail.com>
Thu, 19 Nov 2009 17:44:18 +0000 (18:44 +0100)
committerantirez <antirez@gmail.com>
Thu, 19 Nov 2009 17:44:18 +0000 (18:44 +0100)
benchmark.c
redis.c

index bd1e861106dded7f67151d925ac0a2db40b0018c..2994186bab09d9d96c222b121eab65dd408f26c5 100644 (file)
@@ -365,9 +365,7 @@ static void createMissingClients(client c) {
         sdsfree(new->obuf);
         new->obuf = sdsdup(c->obuf);
         if (config.randomkeys) randomizeClientKey(c);
-        new->replytype = c->replytype;
-        if (c->replytype == REPLY_BULK)
-            new->readlen = -1;
+        prepareClientForReply(new,c->replytype);
     }
 }
 
diff --git a/redis.c b/redis.c
index a45f28314a3caec5615c1c46e7939c85379b388b..df3b413192bc98cda7c2460968fdb7e37eb785ca 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -1385,6 +1385,7 @@ static void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask)
 
 
     /* Use writev() if we have enough buffers to send */
+    #if 0
     if (!server.glueoutputbuf &&
         listLength(c->reply) > REDIS_WRITEV_THRESHOLD && 
         !(c->flags & REDIS_MASTER))
@@ -1392,6 +1393,7 @@ static void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask)
         sendReplyToClientWritev(el, fd, privdata, mask);
         return;
     }
+    #endif
 
     while(listLength(c->reply)) {
         if (server.glueoutputbuf && listLength(c->reply) > 1)