diff --git a/src/networking.c b/src/networking.c index 33531363f0ef5098bae315477c13ab5578fba964..dc599d4814e92e250390607e44b055bafb0ca987 100644 --- a/src/networking.c +++ b/src/networking.c @@ -149,7 +149,7 @@ int prepareClientToWrite(redisClient *c) { if (c->fd <= 0) return REDIS_ERR; /* Fake client */ if (c->bufpos == 0 && listLength(c->reply) == 0 && (c->replstate == REDIS_REPL_NONE || - c->replstate == REDIS_REPL_ONLINE) && + c->replstate == REDIS_REPL_ONLINE) && !c->repl_put_online_on_ack && aeCreateFileEvent(server.el, c->fd, AE_WRITABLE, sendReplyToClient, c) == AE_ERR) return REDIS_ERR; return REDIS_OK; diff --git a/src/replication.c b/src/replication.c index e5a7c2614c1060703e8b1bde3546cbdff525954e..a277decee26ce64a5e610591442679ec21085487 100644 --- a/src/replication.c +++ b/src/replication.c @@ -773,6 +773,7 @@ void updateSlavesWaitingBgsave(int bgsaveerr, int type) { * is technically online now. */ slave->replstate = REDIS_REPL_ONLINE; slave->repl_put_online_on_ack = 1; + slave->repl_ack_time = server.unixtime; } else { if (bgsaveerr != REDIS_OK) { freeClient(slave);