mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 00:31:21 +00:00
Two small fixes to maxclients handling.
1) Don't accept maxclients set to < 0 2) Allow maxclients < 1024, it is useful for testing.
This commit is contained in:
@ -155,6 +155,9 @@ void loadServerConfigFromString(char *config) {
|
||||
loadServerConfig(argv[1],NULL);
|
||||
} else if (!strcasecmp(argv[0],"maxclients") && argc == 2) {
|
||||
server.maxclients = atoi(argv[1]);
|
||||
if (server.maxclients < 1) {
|
||||
err = "Invalid max clients limit"; goto loaderr;
|
||||
}
|
||||
} else if (!strcasecmp(argv[0],"maxmemory") && argc == 2) {
|
||||
server.maxmemory = memtoll(argv[1],NULL);
|
||||
} else if (!strcasecmp(argv[0],"maxmemory-policy") && argc == 2) {
|
||||
|
Reference in New Issue
Block a user