From d3f7eb0c87e9d4c9b7c33c01d4c8569083ae9363 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Fri, 2 Aug 2019 17:17:19 +0800 Subject: [PATCH 1/2] networking: flushSlavesOutputBuffers bugfix --- src/networking.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/networking.c b/src/networking.c index 7976caf29..a39fd73d8 100644 --- a/src/networking.c +++ b/src/networking.c @@ -2468,7 +2468,6 @@ void flushSlavesOutputBuffers(void) { listRewind(server.slaves,&li); while((ln = listNext(&li))) { 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 @@ -2476,9 +2475,8 @@ void flushSlavesOutputBuffers(void) { * 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 && + if (slave->replstate == SLAVE_STATE_ONLINE && + !slave->repl_put_online_on_ack && clientHasPendingReplies(slave)) { writeToClient(slave->fd,slave,0); From 0a97149dec49b654ed8e9c68dc7704ddd699d273 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Wed, 7 Aug 2019 13:05:33 +0300 Subject: [PATCH 2/2] RM_ReplyWithCString was missing registration --- src/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module.c b/src/module.c index 275ee4344..ab614c529 100644 --- a/src/module.c +++ b/src/module.c @@ -5389,6 +5389,7 @@ void moduleRegisterCoreAPI(void) { REGISTER_API(ReplySetArrayLength); REGISTER_API(ReplyWithString); REGISTER_API(ReplyWithStringBuffer); + REGISTER_API(ReplyWithCString); REGISTER_API(ReplyWithNull); REGISTER_API(ReplyWithCallReply); REGISTER_API(ReplyWithDouble);