aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-01 12:19:36 +0100
committerKim Alvefur <zash@zash.se>2019-12-01 12:19:36 +0100
commita62ff5dc64f7034477ca073900e917ca6398c2a2 (patch)
tree35ab7f864fddda55141dde0cd1e278b58a7f1a4f /plugins/mod_s2s
parent62b9a7f53fcbce310f19f224edc45418885ee5c0 (diff)
downloadprosody-a62ff5dc64f7034477ca073900e917ca6398c2a2.tar.gz
prosody-a62ff5dc64f7034477ca073900e917ca6398c2a2.zip
mod_s2s: Use stanza type check instead of duck typing
Diffstat (limited to 'plugins/mod_s2s')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 82f6a95d..64ca7709 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -521,7 +521,7 @@ local function session_close(session, reason, remote_reason, bounce_reason)
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);