]> git.saurik.com Git - redis.git/blobdiff - redis.c
Use writev(2) if glue output buffers is disabled
[redis.git] / redis.c
diff --git a/redis.c b/redis.c
index daf2c9bcee6eef51bbecc6c2a48a92ab543baf14..a45f28314a3caec5615c1c46e7939c85379b388b 100644 (file)
--- 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)