summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMixficsol <838844609@qq.com>2022-06-06 13:17:18 +0800
committerGitHub <noreply@github.com>2022-06-06 08:17:18 +0300
commitc751d8a686aa298d591ccf18adf5d1cc19808a4c (patch)
tree5c741339f8eeceb706d6b59fd330c11efc46f19f
parent247e792bde45ab36cbbaecad5c7f9d5660bbff01 (diff)
downloadredis-c751d8a686aa298d591ccf18adf5d1cc19808a4c.tar.gz
Update cluster.c (#10773)
On line 4068, redis has a logical nodeIsSlave(myself) on the outer if layer, which you can delete without having to repeat the decision
-rw-r--r--src/cluster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cluster.c b/src/cluster.c
index 5f3c75e09..d328ede2f 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -4077,7 +4077,7 @@ void clusterCron(void) {
orphaned_masters++;
}
if (okslaves > max_slaves) max_slaves = okslaves;
- if (nodeIsSlave(myself) && myself->slaveof == node)
+ if (myself->slaveof == node)
this_slaves = okslaves;
}