]> git.saurik.com Git - redis.git/commitdiff
RESTORE ability to set a TTL fixed, bug introduced with millisecond expires.
authorantirez <antirez@gmail.com>
Mon, 2 Apr 2012 09:14:47 +0000 (11:14 +0200)
committerantirez <antirez@gmail.com>
Mon, 2 Apr 2012 09:14:47 +0000 (11:14 +0200)
src/cluster.c

index a0dd6519e3ef8958a1e22de3bbdddb9bc7b748c7..308d3bf7ae1f8bf0e42e32be176914dbb2a9c545 100644 (file)
@@ -1577,7 +1577,7 @@ void restoreCommand(redisClient *c) {
 
     /* Create the key and set the TTL if any */
     dbAdd(c->db,c->argv[1],obj);
-    if (ttl) setExpire(c->db,c->argv[1],time(NULL)+ttl);
+    if (ttl) setExpire(c->db,c->argv[1],mstime()+ttl);
     signalModifiedKey(c->db,c->argv[1]);
     addReply(c,shared.ok);
     server.dirty++;