From 94d9ba7ce14ebd30975f893e37e0defb0aeb080f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 24 Oct 2021 15:11:01 +0200 Subject: mod_s2s: Fix logging of consistency with other mods `reason` was often a table, so the log said "table: 0xptr" or such. mod_c2s, mod_bosh etc logs the stream error stanza object, so better do the same. It would be nicer if this was an util.error object, but that will have to be a future change. --- plugins/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua index 71dcd358..7b915194 100644 --- a/plugins/mod_s2s.lua +++ b/plugins/mod_s2s.lua @@ -650,7 +650,7 @@ local function session_close(session, reason, remote_reason, bounce_reason) if st.is_stanza(stream_error) then -- to and from are never unknown on outgoing connections log("debug", "Disconnecting %s->%s[%s], is: %s", - session.from_host or "(unknown host)" or session.ip, session.to_host or "(unknown host)", session.type, reason); + session.from_host or "(unknown host)" or session.ip, session.to_host or "(unknown host)", session.type, stream_error); session.sends2s(stream_error); end else -- cgit v1.2.3