]> git.saurik.com Git - redis.git/commitdiff
Remove the write handler only if there are no longer objects in the output queue...
authorantirez <antirez@gmail.com>
Mon, 12 Sep 2011 09:05:48 +0000 (11:05 +0200)
committerantirez <antirez@gmail.com>
Mon, 12 Sep 2011 09:06:28 +0000 (11:06 +0200)
src/networking.c

index 7f9b96f7da01c7ebdfcbd1202f510fffa4eec1f6..3979ab6225c4ca24ca64f557db46e03a0edc6f9f 100644 (file)
@@ -610,7 +610,7 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) {
         }
     }
     if (totwritten > 0) c->lastinteraction = time(NULL);
-    if (listLength(c->reply) == 0) {
+    if (c->bufpos == 0 && listLength(c->reply) == 0) {
         c->sentlen = 0;
         aeDeleteFileEvent(server.el,c->fd,AE_WRITABLE);