From 6967d0bd5aac7c7d112bb3da3c6068dac930c6fc Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 18 Jun 2018 17:09:00 +0200 Subject: [PATCH] Revert fix #4976 just leaving the flush() part. --- src/debug.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/debug.c b/src/debug.c index 47821475..a54591bd 100644 --- a/src/debug.c +++ b/src/debug.c @@ -348,11 +348,7 @@ NULL serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD"); addReply(c,shared.ok); } else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) { - if (server.aof_state == AOF_OFF) { - addReply(c, shared.err); - return; - } - flushAppendOnlyFile(1); + if (server.aof_state != AOF_OFF) flushAppendOnlyFile(1); emptyDb(-1,EMPTYDB_NO_FLAGS,NULL); if (loadAppendOnlyFile(server.aof_filename) != C_OK) { addReply(c,shared.err);