Skip to content

Commit ef446bf

Browse files
authored
Merge pull request redis#3802 from flowly/bugfix-calc-stat-net-output-bytes
Bugfix calc stat net output bytes
2 parents 1d857a9 + de07deb commit ef446bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/networking.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,11 @@ int writeToClient(int fd, client *c, int handler_installed) {
937937
*
938938
* However if we are over the maxmemory limit we ignore that and
939939
* just deliver as much data as it is possible to deliver. */
940-
server.stat_net_output_bytes += totwritten;
941940
if (totwritten > NET_MAX_WRITES_PER_EVENT &&
942941
(server.maxmemory == 0 ||
943942
zmalloc_used_memory() < server.maxmemory)) break;
944943
}
944+
server.stat_net_output_bytes += totwritten;
945945
if (nwritten == -1) {
946946
if (errno == EAGAIN) {
947947
nwritten = 0;

0 commit comments

Comments
 (0)