fix: fix the if condition in clusterManagerShowClusterInfo

This commit is contained in:
vattezhang 2019-03-12 22:01:02 +08:00
parent 8a46d32be2
commit bdc783b472

View File

@ -2841,7 +2841,7 @@ static void clusterManagerShowClusterInfo(void) {
replicas++;
}
redisReply *reply = CLUSTER_MANAGER_COMMAND(node, "DBSIZE");
if (reply != NULL || reply->type == REDIS_REPLY_INTEGER)
if (reply != NULL && reply->type == REDIS_REPLY_INTEGER)
dbsize = reply->integer;
if (dbsize < 0) {
char *err = "";