Changeset

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
parents 10475:fa0cad7c89e3
children 10477:28755107c2f4
files plugins/mod_s2s/mod_s2s.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);