From 198eb2a0408915fea76b42218ef210cbffdfe073 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 60f1b798e..0ca433787 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1751,7 +1751,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); }