Fix PERSIST expired key resuscitation issue #4048.

This commit is contained in:
antirez
2017-06-13 10:35:51 +02:00
parent e91b81c612
commit 5877c02c51
2 changed files with 4 additions and 7 deletions

View File

@ -93,7 +93,7 @@ robj *lookupKeyReadWithFlags(redisDb *db, robj *key, int flags) {
if (expireIfNeeded(db,key) == 1) {
/* Key expired. If we are in the context of a master, expireIfNeeded()
* returns 0 only when the key does not exist at all, so it's save
* returns 0 only when the key does not exist at all, so it's safe
* to return NULL ASAP. */
if (server.masterhost == NULL) return NULL;