summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2016-08-02 10:43:05 +0200
committerGitHub <noreply@github.com>2016-08-02 10:43:05 +0200
commit2444c82a3fd52416ce6b2f408146b9cf473e3d9f (patch)
tree46faa6b4e6cdc42355efc8804d12894ae783b246
parent71536684a788dc859e42132a2c5a2b7373414375 (diff)
parente67ad1d1eb0102dd30b239abd6baa65ce117c35b (diff)
downloadredis-2444c82a3fd52416ce6b2f408146b9cf473e3d9f.tar.gz
Merge pull request #3426 from QuChen88/3.2
Fix a bug to delay bgsave while AOF rewrite in progress for replication
-rw-r--r--src/replication.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/replication.c b/src/replication.c
index 6cb1e5554..e7194e59e 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -676,7 +676,7 @@ void syncCommand(client *c) {
/* Target is disk (or the slave is not capable of supporting
* diskless replication) and we don't have a BGSAVE in progress,
* let's start one. */
- if (server.aof_child_pid != -1) {
+ if (server.aof_child_pid == -1) {
startBgsaveForReplication(c->slave_capa);
} else {
serverLog(LL_NOTICE,