From 15f487b789c4347fb10d29d22087e6bc9278ec82 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 26 Nov 2023 14:29:08 +0100 Subject: mod_storage_internal: Only close lazy-loading list store abstractions Since datamanager can fall back to the old method of loading the whole list, which wouldn't come with a :close method. --- plugins/mod_storage_internal.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/mod_storage_internal.lua') diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua index 26dd6a0e..35d3269f 100644 --- a/plugins/mod_storage_internal.lua +++ b/plugins/mod_storage_internal.lua @@ -258,7 +258,9 @@ function archive:find(username, query) return function() local item = iter(); if item == nil then - list:close(); + if list.close then + list:close(); + end return end local key = item.key; -- cgit v1.2.3