# HG changeset patch # User Kim Alvefur # Date 1689956934 -7200 # Node ID dbd7a6b09ada722d1adef770041e4aace84ba212 # Parent c886ea087b382876fc2ae89af4124e64df7f8fdc util.datamanager: Close file handle when done using it It gets closed eventually but at high load they could potentially lead to reaching FD limits faster. diff -r c886ea087b38 -r dbd7a6b09ada util/datamanager.lua --- a/util/datamanager.lua Fri Jul 21 18:28:16 2023 +0200 +++ b/util/datamanager.lua Fri Jul 21 18:28:54 2023 +0200 @@ -361,6 +361,7 @@ -- so we need to collect the "current" position at the end of the previous prev_pos = fh:seek() end + fh:close(); if prev_pos ~= 0 then t_insert(items, { start = last_item_start; length = prev_pos - last_item_start }); end