• antirez's avatar
    TTL / PTTL commands: two bugs fixed. · a452b548
    antirez authored
    This commit fixes two corner cases for the TTL command.
    
    1) When the key was already logically expired (expire time older
    than current time) the command returned -1 instead of -2.
    
    2) When the key was existing and the expire was found to be exactly 0
    (the key was just about to expire), the command reported -1 (that is, no
    expire) instead of a TTL of zero (that is, about to expire).
    a452b548
db.c 21.8 KB