From 3d3faa0a190e3ad987613b4c3f853d9ffd38a237 Mon Sep 17 00:00:00 2001 From: heqin Date: Wed, 17 Jan 2018 18:08:30 +0800 Subject: [PATCH] fixbug for #4545 dead loop aof rewrite --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index f40a7be55..b144db025 100644 --- a/src/server.c +++ b/src/server.c @@ -1120,7 +1120,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { /* Trigger an AOF rewrite if needed */ // If AOF disabled, we don't rewrite AOF file. - if (server.aof_fd != -1 && + if (server.aof_state == AOF_ON && server.rdb_child_pid == -1 && server.aof_child_pid == -1 && server.aof_rewrite_perc &&