From: Konstantin Merenkov Date: Fri, 2 Apr 2010 20:12:10 +0000 (+0400) Subject: Don't set expire to keys with ttl=0, remove them immediately. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/d4dd6556c3925ae26b1fce142158b3243eda39a7 Don't set expire to keys with ttl=0, remove them immediately. --- diff --git a/redis.c b/redis.c index db46763b..4264b7e2 100644 --- a/redis.c +++ b/redis.c @@ -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;