Skip to content

Commit

Permalink
兼容cluster solts命令。 支持redis 3.0和4.0
Browse files Browse the repository at this point in the history
判断solt信息至少包含了ip和port两个内容
  • Loading branch information
wenyuan-ma authored Jul 16, 2018
1 parent 58ac7d9 commit 50befbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hircluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ parse_cluster_slots(redisClusterContext *cc,
}else{
elem_nodes = elem_slots->element[idx];
if(elem_nodes->type != REDIS_REPLY_ARRAY ||
elem_nodes->elements != 2){
elem_nodes->elements < 2){
__redisClusterSetError(cc, REDIS_ERR_OTHER,
"Command(cluster slots) reply error: "
"nodes sub_reply is not an correct array.");
Expand Down

0 comments on commit 50befbf

Please sign in to comment.