Software /
code /
prosody
Diff
plugins/mod_scansion_record.lua @ 9366:9472b4044fc6
mod_scansion_record: Close files in the cleanup stage of shutdown (fixes use after close)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Sep 2018 15:14:25 +0200 |
parent | 9365:acb316319dc0 |
child | 9367:577c3a7f5045 |
line wrap: on
line diff
--- 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);