diff options
author | antirez <antirez@gmail.com> | 2015-11-09 17:07:46 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-11-09 17:07:46 +0100 |
commit | b719eedfc6db1aa34cc89e8f771189a344a03e23 (patch) | |
tree | 4ae633ec3825cdb2f3e923999732aa18b6bae401 | |
parent | 1b5d24eb2b8f5ef26c6067c895fcb5ebb89a991b (diff) | |
download | redis-b719eedfc6db1aa34cc89e8f771189a344a03e23.tar.gz |
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.
-rw-r--r-- | src/networking.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |