From b410f64f3303310d6751d04212c03c6a0435735a Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sat, 13 Jul 2019 15:01:07 +0200 Subject: [PATCH] mod_spam_filter: Fix previous simplification --- mod_spam_filter/src/mod_spam_filter.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod_spam_filter/src/mod_spam_filter.erl b/mod_spam_filter/src/mod_spam_filter.erl index 5373bcb..ef977ae 100644 --- a/mod_spam_filter/src/mod_spam_filter.erl +++ b/mod_spam_filter/src/mod_spam_filter.erl @@ -262,7 +262,9 @@ handle_info(Info, State) -> -spec terminate(normal | shutdown | {shutdown, term()} | term(), state()) -> ok. terminate(Reason, #state{host = Host} = State) -> ?DEBUG("Stopping spam filter process for ~s: ~p", [Host, Reason]), - close_dump_file(State), + DumpFile = gen_mod:get_module_opt(Host, ?MODULE, spam_dump_file), + DumpFile1 = expand_host(DumpFile, Host), + close_dump_file(DumpFile1, State), ejabberd_hooks:delete(reopen_log_hook, ?MODULE, reopen_log, 50), ejabberd_hooks:delete(s2s_receive_packet, Host, ?MODULE,