RESTORE ability to set a TTL fixed, bug introduced with millisecond expires.

This commit is contained in:
antirez 2012-04-02 11:14:47 +02:00
parent a149ce6875
commit 70d848e1fa

View 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++;