From a26d5ca4161b3507362017db3b86f5253f3545c9 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 9 Nov 2015 17:07:46 +0100 Subject: [PATCH] Use clientHasPendingReplies() in flushSlavesOutputBuffers() The old version only flushed data to slaves if there were strings pending in the client->reply list. Now also static buffers are flushed. Does not help to free memory (which is the only use we have right now in the fuction), but is more correct conceptually, and may be used in other contexts. --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index 8ee9867ff3..8ebd7d61db 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1776,7 +1776,7 @@ void flushSlavesOutputBuffers(void) { events = aeGetFileEvents(server.el,slave->fd); if (events & AE_WRITABLE && slave->replstate == SLAVE_STATE_ONLINE && - listLength(slave->reply)) + clientHasPendingReplies(slave)) { writeToClient(slave->fd,slave,0); }