From b892cabed4079de8a1c6ac18041e3ea835c80300 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 19 Nov 2009 18:44:18 +0100 Subject: [PATCH] redis-benchmark hopefully last bug with multi bulk reply fixed --- benchmark.c | 4 +--- redis.c | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark.c b/benchmark.c index bd1e86110..2994186ba 100644 --- a/benchmark.c +++ b/benchmark.c @@ -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 a45f28314..df3b41319 100644 --- 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)