Software /
code /
prosody
Diff
util/datamanager.lua @ 13235:dbd7a6b09ada
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Jul 2023 18:28:54 +0200 |
parent | 13234:c886ea087b38 |
child | 13236:9c72f93b7a02 |
line wrap: on
line diff
--- 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