Comparison

plugins/mod_storage_internal.lua @ 13340:92b7ccc76c3a

mod_storage_internal: Close archive list after completion of iteration This closes the two FDs that the random access list abstraction uses, otherwise they are left to the garbage collector.
author Kim Alvefur <zash@zash.se>
date Thu, 23 Nov 2023 17:49:57 +0100
parent 13263:e77994e88940
child 13343:9a9455de295d
comparison
equal deleted inserted replaced
13339:c94989c557cd 13340:92b7ccc76c3a
256 end 256 end
257 257
258 return function() 258 return function()
259 local item = iter(); 259 local item = iter();
260 if item == nil then 260 if item == nil then
261 list:close();
261 return 262 return
262 end 263 end
263 local key = item.key; 264 local key = item.key;
264 local when = item.when or item.attr and datetime.parse(item.attr.stamp); 265 local when = item.when or item.attr and datetime.parse(item.attr.stamp);
265 local with = item.with; 266 local with = item.with;