mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
free memory if the maxmemory parameter is reduced via CONFIG SET
This commit is contained in:
parent
1dd10ca233
commit
b4f2e412d0
@ -241,6 +241,7 @@ void configSetCommand(redisClient *c) {
|
||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||
ll < 0) goto badfmt;
|
||||
server.maxmemory = ll;
|
||||
if (server.maxmemory) freeMemoryIfNeeded();
|
||||
} else if (!strcasecmp(c->argv[2]->ptr,"timeout")) {
|
||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||
ll < 0 || ll > LONG_MAX) goto badfmt;
|
||||
|
Loading…
Reference in New Issue
Block a user