MEMORY: fix the missing of monitor clients buffers

This commit is contained in:
zhaozhao.zz 2018-05-27 16:34:58 +08:00
parent f8fd6639e7
commit ce2e0c02fc

View File

@ -968,7 +968,7 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
listRewind(server.clients,&li);
while((ln = listNext(&li))) {
client *c = listNodeValue(ln);
if (c->flags & CLIENT_SLAVE)
if (c->flags & CLIENT_SLAVE && !(c->flags & CLIENT_MONITOR))
continue;
mem += getClientOutputBufferMemoryUsage(c);
mem += sdsAllocSize(c->querybuf);