mod_storage_internal: Only close lazy-loading list store abstractions
authorKim Alvefur <zash@zash.se>
Sun, 26 Nov 2023 14:29:08 +0100
changeset 13347 9a9455de295d
parent 13346 d0a9b631a937
child 13348 958c759d3897
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
--- a/plugins/mod_storage_internal.lua	Fri Nov 24 13:41:21 2023 +0100
+++ b/plugins/mod_storage_internal.lua	Sun Nov 26 14:29:08 2023 +0100
@@ -258,7 +258,9 @@
 	return function()
 		local item = iter();
 		if item == nil then
-			list:close();
+			if list.close then
+				list:close();
+			end
 			return
 		end
 		local key = item.key;