summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/networking.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 782dc6c4a..336561e10 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -1668,6 +1668,12 @@ void flushSlavesOutputBuffers(void) {
client *slave = listNodeValue(ln);
int events;
+ /* Note that the following will not flush output buffers of slaves
+ * in STATE_ONLINE but having put_online_on_ack set to true: in this
+ * case the writable event is never installed, since the purpose
+ * of put_online_on_ack is to postpone the moment it is installed.
+ * This is what we want since slaves in this state should not receive
+ * writes before the first ACK. */
events = aeGetFileEvents(server.el,slave->fd);
if (events & AE_WRITABLE &&
slave->replstate == SLAVE_STATE_ONLINE &&