Commit 34c1871e authored by antirez's avatar antirez
Browse files

Cluster: set node role on successful handshake.

parent cda0cdfb
...@@ -855,6 +855,7 @@ int clusterProcessPacket(clusterLink *link) { ...@@ -855,6 +855,7 @@ int clusterProcessPacket(clusterLink *link) {
redisLog(REDIS_DEBUG,"Handshake with node %.40s completed.", redisLog(REDIS_DEBUG,"Handshake with node %.40s completed.",
link->node->name); link->node->name);
link->node->flags &= ~REDIS_NODE_HANDSHAKE; link->node->flags &= ~REDIS_NODE_HANDSHAKE;
link->node->flags |= flags&(REDIS_NODE_MASTER|REDIS_NODE_SLAVE);
update_config = 1; update_config = 1;
} else if (memcmp(link->node->name,hdr->sender, } else if (memcmp(link->node->name,hdr->sender,
REDIS_CLUSTER_NAMELEN) != 0) REDIS_CLUSTER_NAMELEN) != 0)
......
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