From de07deb4d2ca3b9971a29319937aeb0c76b58011 Mon Sep 17 00:00:00 2001 From: "minghang.zmh" Date: Fri, 10 Feb 2017 20:13:01 +0800 Subject: [PATCH] fix server.stat_net_output_bytes calc bug --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index 343a910e..bb5d7473 100644 --- a/src/networking.c +++ b/src/networking.c @@ -931,11 +931,11 @@ int writeToClient(int fd, client *c, int handler_installed) { * * However if we are over the maxmemory limit we ignore that and * just deliver as much data as it is possible to deliver. */ - server.stat_net_output_bytes += totwritten; if (totwritten > NET_MAX_WRITES_PER_EVENT && (server.maxmemory == 0 || zmalloc_used_memory() < server.maxmemory)) break; } + server.stat_net_output_bytes += totwritten; if (nwritten == -1) { if (errno == EAGAIN) { nwritten = 0;