summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-07-31 13:14:24 +0200
committerantirez <antirez@gmail.com>2018-08-02 18:34:04 +0200
commit0e77cef096618b31707b09e72b0fbc304e2fbcc9 (patch)
treea4abbf84927d794c259f7567f3e450cc98d50a62
parentacfe9d138a85592dcac086b7855d7fffa90cf73d (diff)
downloadredis-0e77cef096618b31707b09e72b0fbc304e2fbcc9.tar.gz
Fix writeCommandsDeniedByDiskError() inverted return value.
-rw-r--r--src/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c
index fbbfba7ff..28750ab72 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2821,11 +2821,11 @@ int writeCommandsDeniedByDiskError(void) {
server.saveparamslen > 0 &&
server.lastbgsave_status == C_ERR)
{
- return DISK_ERROR_TYPE_AOF;
+ return DISK_ERROR_TYPE_RDB;
} else if (server.aof_state != AOF_OFF &&
server.aof_last_write_status == C_ERR)
{
- return DISK_ERROR_TYPE_RDB;
+ return DISK_ERROR_TYPE_AOF;
} else {
return DISK_ERROR_TYPE_NONE;
}