Replication: send REPLCONF ACK to master.

This commit is contained in:
antirez
2013-05-25 00:54:00 +02:00
parent 6b4635f4f5
commit 0292c5f7ae
3 changed files with 15 additions and 3 deletions

View File

@ -127,7 +127,8 @@ redisClient *createClient(int fd) {
* data should be appended to the output buffers. */
int prepareClientToWrite(redisClient *c) {
if (c->flags & REDIS_LUA_CLIENT) return REDIS_OK;
if (c->flags & REDIS_MASTER) return REDIS_ERR;
if ((c->flags & REDIS_MASTER) &&
!(c->flags & REDIS_MASTER_FORCE_REPLY)) return REDIS_ERR;
if (c->fd <= 0) return REDIS_ERR; /* Fake client */
if (c->bufpos == 0 && listLength(c->reply) == 0 &&
(c->replstate == REDIS_REPL_NONE ||