]> git.saurik.com Git - redis.git/commitdiff
Don't set expire to keys with ttl=0, remove them immediately.
authorKonstantin Merenkov <kmerenkov@gmail.com>
Fri, 2 Apr 2010 20:12:10 +0000 (00:12 +0400)
committerantirez <antirez@gmail.com>
Thu, 15 Apr 2010 19:29:46 +0000 (21:29 +0200)
redis.c

diff --git a/redis.c b/redis.c
index db46763b8a8db0a81231be3d7a9ffde857634445..4264b7e23510b131c989f772f08c7f068d6eb9b3 100644 (file)
--- 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;