summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-09-14 12:33:48 +0200
committerantirez <antirez@gmail.com>2015-09-14 12:34:17 +0200
commit4fec5ee1650131eed40044a1614bd3d70ba1696c (patch)
treec168017262a3d6a4c8b5df43af7fe6714c367e6b
parentf529a01c1b52367b4337119ae8f86fd1d790a5ea (diff)
downloadredis-4fec5ee1650131eed40044a1614bd3d70ba1696c.tar.gz
MOVE re-add TTL check fixed.
getExpire() returns -1 when no expire exists. Related to #2765.
-rw-r--r--src/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.c b/src/db.c
index df2e50ca5..a907c04dd 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 */