Fix patch provided in #6554.

This commit is contained in:
antirez
2019-11-19 17:22:39 +01:00
parent e9fbc96033
commit 0fefed25e4
+8 -1
View File
@@ -262,6 +262,13 @@ void handleClientsBlockedOnKeys(void) {
* we can safely call signalKeyAsReady() against this key. */
dictDelete(rl->db->ready_keys,rl->key);
/* Even if we are not inside call(), increment the call depth
* in order to make sure that keys are expired against a fixed
* reference time, and not against the wallclock time. This
* way we can lookup an object multiple times (BRPOPLPUSH does
* that) without the risk of it being freed in the second
* lookup, invalidating the first one.
* See https://github.com/antirez/redis/pull/6554. */
server.call_depth++;
updateCachedTime(0);
@@ -461,7 +468,7 @@ void handleClientsBlockedOnKeys(void) {
}
}
server.call_depth++;
server.call_depth--;
/* Free this item. */
decrRefCount(rl->key);