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); diff --git a/src/networking.c b/src/networking.c index 9ff2afd8d..7bdd3c474 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 @@ -2477,9 +2476,8 @@ void flushSlavesOutputBuffers(void) { * This is what we want since slaves in this state should not receive * writes before the first ACK (to know the reason, grep for this * flag in this file). */ - 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);