From 2bb036eda7d8f66f71dbde95f6aca53b7a7b32cd Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 1 Apr 2021 17:46:14 +0100 Subject: fixup --- synapse/util/caches/lrucache.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py index 9f5928b2f1..5a0f9992c5 100644 --- a/synapse/util/caches/lrucache.py +++ b/synapse/util/caches/lrucache.py @@ -182,7 +182,9 @@ class LruCache(Generic[KT, VT]): or 0 < list_root.prev_node.allocated_ts < ten_minutes_ago + 60 ): i += 1 - if list_root.prev_node.allocated_ts > ten_minutes_ago: + todelete = list_root.prev_node + + if 0 < todelete.allocated_ts < ten_minutes_ago: continue todelete = list_root.prev_node -- cgit 1.5.1