Cluster Manager: fixed master_id check in clusterManagerNodeLoadInfo

This commit is contained in:
artix 2018-06-01 15:32:44 +02:00 committed by antirez
parent d49d023828
commit d168b245b3

View File

@ -3088,7 +3088,7 @@ static int clusterManagerNodeLoadInfo(clusterManagerNode *node, int opts,
currentNode->flags |= CLUSTER_MANAGER_FLAG_FAIL;
else if (strcmp(flag, "slave") == 0) {
currentNode->flags |= CLUSTER_MANAGER_FLAG_SLAVE;
if (master_id == 0) {
if (master_id != NULL) {
if (currentNode->replicate) sdsfree(currentNode->replicate);
currentNode->replicate = sdsnew(master_id);
}