提交 d4dd6556 编写于 作者: K Konstantin Merenkov 提交者: antirez

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册