# HG changeset patch # User Kim Alvefur # Date 1575199176 -3600 # Node ID 035027a868bc9ee82b97dc8c59b86db41395713a # Parent fa0cad7c89e3bc99dccf8d7852485f947730dbfb mod_s2s: Use stanza type check instead of duck typing diff -r fa0cad7c89e3 -r 035027a868bc plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Sun Dec 01 02:04:24 2019 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Sun Dec 01 12:19:36 2019 +0100 @@ -521,7 +521,7 @@ log("debug", "Disconnecting %s[%s], is: %s", session.host or session.ip or "(unknown host)", session.type, stanza); session.sends2s(stanza); - elseif reason.name then -- a stanza + elseif st.is_stanza(reason) then log("debug", "Disconnecting %s->%s[%s], is: %s", session.from_host or "(unknown host)", session.to_host or "(unknown host)", session.type, reason);