From: antirez Date: Thu, 19 Nov 2009 17:44:18 +0000 (+0100) Subject: redis-benchmark hopefully last bug with multi bulk reply fixed X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/b892cabed4079de8a1c6ac18041e3ea835c80300?hp=58cd710344c2a18c6d55895dc960cd141109c5a8 redis-benchmark hopefully last bug with multi bulk reply fixed --- diff --git a/benchmark.c b/benchmark.c index bd1e8611..2994186b 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 a45f2831..df3b4131 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)