mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Fix invalid expire error for SET family commands.
This commit is contained in:
parent
18ca831830
commit
a6edfceaa8
@ -69,7 +69,7 @@ void setGenericCommand(redisClient *c, int flags, robj *key, robj *val, robj *ex
|
|||||||
if (getLongLongFromObjectOrReply(c, expire, &milliseconds, NULL) != REDIS_OK)
|
if (getLongLongFromObjectOrReply(c, expire, &milliseconds, NULL) != REDIS_OK)
|
||||||
return;
|
return;
|
||||||
if (milliseconds <= 0) {
|
if (milliseconds <= 0) {
|
||||||
addReplyError(c,"invalid expire time in SETEX");
|
addReplyErrorFormat(c,"invalid expire time in %s",c->cmd->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (unit == UNIT_SECONDS) milliseconds *= 1000;
|
if (unit == UNIT_SECONDS) milliseconds *= 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user