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

This commit is contained in:
Konstantin Merenkov 2010-04-03 00:12:10 +04:00 committed by antirez
parent bc55456975
commit d4dd6556c3

View File

@ -7072,7 +7072,7 @@ static void expireGenericCommand(redisClient *c, robj *key, robj *param, long of
addReply(c,shared.czero);
return;
}
if (seconds < 0) {
if (seconds <= 0) {
if (deleteKey(c->db,key)) server.dirty++;
addReply(c, shared.cone);
return;