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
This commit is contained in:
Mixficsol
2022-06-06 13:17:18 +08:00
committed by GitHub
parent 247e792bde
commit c751d8a686

View File

@@ -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;
}