Crash in Memory Doctor when all clients are slaves
Former-commit-id: f6814aa82564ad1b095edefeda9541859cbbb804
This commit is contained in:
parent
2509750fc7
commit
5b557d3989
@ -1133,7 +1133,7 @@ sds getMemoryDoctorReport(void) {
|
|||||||
/* Clients using more than 200k each average? */
|
/* Clients using more than 200k each average? */
|
||||||
long numslaves = listLength(server.slaves);
|
long numslaves = listLength(server.slaves);
|
||||||
long numclients = listLength(server.clients)-numslaves;
|
long numclients = listLength(server.clients)-numslaves;
|
||||||
if (mh->clients_normal / numclients > (1024*200)) {
|
if ((numclients > 0) && mh->clients_normal / numclients > (1024*200)) {
|
||||||
big_client_buf = 1;
|
big_client_buf = 1;
|
||||||
num_reports++;
|
num_reports++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user