diff --git a/src/replication.c b/src/replication.c index ec36000b2bca8870049a7e8fadfda5e32bbdacdc..4348dcfa79ea1499d335fc9cdea5d38ee1ab2a2e 100644 --- a/src/replication.c +++ b/src/replication.c @@ -457,8 +457,8 @@ void syncCommand(redisClient *c) { * the client about already issued commands. We need a fresh reply * buffer registering the differences between the BGSAVE and the current * dataset, so that we can copy to other slaves if needed. */ - if (listLength(c->reply) != 0) { - addReplyError(c,"SYNC and PSYNC are invalid with pending input"); + if (listLength(c->reply) != 0 || c->bufpos != 0) { + addReplyError(c,"SYNC and PSYNC are invalid with pending output"); return; }