From 4d2e8fa189665e8e76040da9642ca89ef55fba10 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 21 Mar 2014 09:08:08 +0100 Subject: [PATCH] Use getLRUClock() instead of server.lruclock to create objects. Thanks to Matt Stancliff for noticing this error. It was in the original code but somehow I managed to remove the change from the commit... --- src/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object.c b/src/object.c index a8e13625..22ffdd16 100644 --- a/src/object.c +++ b/src/object.c @@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) { o->refcount = 1; /* Set the LRU to the current lruclock (minutes resolution). */ - o->lru = server.lruclock; + o->lru = getLRUClock(); return o; } @@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) { o->encoding = REDIS_ENCODING_EMBSTR; o->ptr = sh+1; o->refcount = 1; - o->lru = server.lruclock; + o->lru = getLRUClock(); sh->len = len; sh->free = 0;