From 646cc81c96cdccdea96df8472fd9bd99bbec6fec Mon Sep 17 00:00:00 2001 From: ShooterIT Date: Thu, 21 May 2020 21:00:21 +0800 Subject: [PATCH] Fix reply bytes calculation error Fix #7275. Former-commit-id: a12210c87561fed5522c9a6e8db6d8606cabe3bf --- src/networking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.cpp b/src/networking.cpp index 13e7f4da3..579e81561 100644 --- a/src/networking.cpp +++ b/src/networking.cpp @@ -612,7 +612,7 @@ void trimReplyUnusedTailSpace(client *c) { /* take over the allocation's internal fragmentation (at least for * memory usage tracking) */ 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; } }