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.
This commit is contained in:
antirez
2015-11-09 17:07:46 +01:00
parent a89a3543b6
commit a26d5ca416

View File

@ -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);
}