From 4fec5ee1650131eed40044a1614bd3d70ba1696c Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 14 Sep 2015 12:33:48 +0200 Subject: [PATCH] MOVE re-add TTL check fixed. getExpire() returns -1 when no expire exists. Related to #2765. --- src/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.c b/src/db.c index df2e50ca..a907c04d 100644 --- a/src/db.c +++ b/src/db.c @@ -785,7 +785,7 @@ void moveCommand(client *c) { return; } dbAdd(dst,c->argv[1],o); - if (expire) setExpire(dst,c->argv[1],expire); + if (expire != -1) setExpire(dst,c->argv[1],expire); incrRefCount(o); /* OK! key moved, free the entry in the source DB */