From 7ea870c09205c93b6e0677ad466bf46a6f11a9ea Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 19 Nov 2009 11:46:28 +0100 Subject: [PATCH] Use writev(2) if glue output buffers is disabled --- redis.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/redis.c b/redis.c index daf2c9bc..a45f2831 100644 --- a/redis.c +++ b/redis.c @@ -1385,14 +1385,13 @@ static void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) /* Use writev() if we have enough buffers to send */ -#if 0 - if (listLength(c->reply) > REDIS_WRITEV_THRESHOLD && - !(c->flags & REDIS_MASTER)) + if (!server.glueoutputbuf && + listLength(c->reply) > REDIS_WRITEV_THRESHOLD && + !(c->flags & REDIS_MASTER)) { sendReplyToClientWritev(el, fd, privdata, mask); return; } -#endif while(listLength(c->reply)) { if (server.glueoutputbuf && listLength(c->reply) > 1)