Fix reply bytes calculation error

Fix #7275.
This commit is contained in:
ShooterIT 2020-05-21 21:00:21 +08:00
parent f0d8484f82
commit 9c0aa1a95b

View File

@ -488,7 +488,7 @@ void trimReplyUnusedTailSpace(client *c) {
/* take over the allocation's internal fragmentation (at least for /* take over the allocation's internal fragmentation (at least for
* memory usage tracking) */ * memory usage tracking) */
tail->size = zmalloc_usable(tail) - sizeof(clientReplyBlock); tail->size = zmalloc_usable(tail) - sizeof(clientReplyBlock);
c->reply_bytes += tail->size - old_size; c->reply_bytes = c->reply_bytes + tail->size - old_size;
listNodeValue(ln) = tail; listNodeValue(ln) = tail;
} }
} }