Commit d168b245 authored by artix's avatar artix Committed by antirez
Browse files

Cluster Manager: fixed master_id check in clusterManagerNodeLoadInfo

parent d49d0238
...@@ -3088,7 +3088,7 @@ static int clusterManagerNodeLoadInfo(clusterManagerNode *node, int opts, ...@@ -3088,7 +3088,7 @@ static int clusterManagerNodeLoadInfo(clusterManagerNode *node, int opts,
currentNode->flags |= CLUSTER_MANAGER_FLAG_FAIL; currentNode->flags |= CLUSTER_MANAGER_FLAG_FAIL;
else if (strcmp(flag, "slave") == 0) { else if (strcmp(flag, "slave") == 0) {
currentNode->flags |= CLUSTER_MANAGER_FLAG_SLAVE; currentNode->flags |= CLUSTER_MANAGER_FLAG_SLAVE;
if (master_id == 0) { if (master_id != NULL) {
if (currentNode->replicate) sdsfree(currentNode->replicate); if (currentNode->replicate) sdsfree(currentNode->replicate);
currentNode->replicate = sdsnew(master_id); currentNode->replicate = sdsnew(master_id);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment