Role command protocol corruption with multiple masters

Former-commit-id: 888d69a87a0076caa5b381d2531a6a638aa69051
This commit is contained in:
John Sully 2020-04-04 22:32:15 -04:00
parent 2684a266c8
commit bf93e32e7e

View File

@ -2594,6 +2594,8 @@ void roleCommand(client *c) {
listNode *ln;
listRewind(g_pserver->masters, &li);
if (listLength(g_pserver->masters) > 1)
addReplyArrayLen(c,listLength(g_pserver->masters));
while ((ln = listNext(&li)))
{
redisMaster *mi = (redisMaster*)listNodeValue(ln);