Commit d4dd6556 authored by Konstantin Merenkov's avatar Konstantin Merenkov Committed by antirez
Browse files

Don't set expire to keys with ttl=0, remove them immediately.

parent bc554569
...@@ -7072,7 +7072,7 @@ static void expireGenericCommand(redisClient *c, robj *key, robj *param, long of ...@@ -7072,7 +7072,7 @@ static void expireGenericCommand(redisClient *c, robj *key, robj *param, long of
addReply(c,shared.czero); addReply(c,shared.czero);
return; return;
} }
if (seconds < 0) { if (seconds <= 0) {
if (deleteKey(c->db,key)) server.dirty++; if (deleteKey(c->db,key)) server.dirty++;
addReply(c, shared.cone); addReply(c, shared.cone);
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment