cluster process publish message only for known nodes. (#8856)

This commit is contained in:
Huang Zhw 2021-05-10 23:29:11 +08:00 committed by GitHub
parent 97108845e2
commit 8526e04e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2148,6 +2148,8 @@ int clusterProcessPacket(clusterLink *link) {
hdr->sender, hdr->data.fail.about.nodename);
}
} else if (type == CLUSTERMSG_TYPE_PUBLISH) {
if (!sender) return 1; /* We don't know that node. */
robj *channel, *message;
uint32_t channel_len, message_len;