mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
fix server.stat_net_output_bytes calc bug
This commit is contained in:
parent
1f72ec7dad
commit
de07deb4d2
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user