# HG changeset patch # User Kim Alvefur # Date 1537622065 -7200 # Node ID 9472b4044fc647d65c78d534a7da40de2df1bcfe # Parent acb316319dc060b0dfaf9db640fea4a69206955a mod_scansion_record: Close files in the cleanup stage of shutdown (fixes use after close) diff -r acb316319dc0 -r 9472b4044fc6 plugins/mod_scansion_record.lua --- a/plugins/mod_scansion_record.lua Sat Sep 22 14:38:40 2018 +0200 +++ b/plugins/mod_scansion_record.lua Sat Sep 22 15:14:25 2018 +0200 @@ -88,6 +88,9 @@ module:hook_global("server-stopping", function () record("# recording ended on "..dt.datetime().."\n"); module:log("info", "Scansion recording available in %s", record_file); +end); + +prosody.events.add_handler("server-cleanup", function () scan:close(); head:close() end);