Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 10476:035027a868bc
mod_s2s: Use stanza type check instead of duck typing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 01 Dec 2019 12:19:36 +0100 |
parent | 10473:b2dd1219a321 |
child | 10477:28755107c2f4 |
line wrap: on
line diff
--- 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], <stream:error> 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], <stream:error> is: %s", session.from_host or "(unknown host)", session.to_host or "(unknown host)", session.type, reason);