Commit fda91dbd authored by antirez's avatar antirez
Browse files

Cluster: check link is valid before sending UPDATE.

parent f57bb36c
...@@ -1691,6 +1691,7 @@ void clusterSendUpdate(clusterLink *link, clusterNode *node) { ...@@ -1691,6 +1691,7 @@ void clusterSendUpdate(clusterLink *link, clusterNode *node) {
unsigned char buf[sizeof(clusterMsg)]; unsigned char buf[sizeof(clusterMsg)];
clusterMsg *hdr = (clusterMsg*) buf; clusterMsg *hdr = (clusterMsg*) buf;
if (link == NULL) return;
clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_UPDATE); clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_UPDATE);
memcpy(hdr->data.update.nodecfg.nodename,node->name,REDIS_CLUSTER_NAMELEN); memcpy(hdr->data.update.nodecfg.nodename,node->name,REDIS_CLUSTER_NAMELEN);
hdr->data.update.nodecfg.configEpoch = htonu64(node->configEpoch); hdr->data.update.nodecfg.configEpoch = htonu64(node->configEpoch);
......
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