mirror of
https://github.com/fluencelabs/redis
synced 2025-06-22 21:41:32 +00:00
Close client connection and log the event when the client input buffer reaches 1GB.
This commit is contained in:
@ -862,6 +862,13 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (sdslen(c->querybuf) > server.client_max_querybuf_len) {
|
||||
sds ci = getClientInfoString(c);
|
||||
redisLog(REDIS_WARNING,"Closing client that reached max query buffer length: %s", ci);
|
||||
sdsfree(ci);
|
||||
freeClient(c);
|
||||
return;
|
||||
}
|
||||
processInputBuffer(c);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user