aboutsummaryrefslogtreecommitdiffstats
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
commita5d6f3717ad968b68b5cdbf4e9ca14d191a933f7 (patch)
tree35ab7f864fddda55141dde0cd1e278b58a7f1a4f
parentae49a4500f5f0d9bb9006da73c784d94881cf9f4 (diff)
downloadprosody-a5d6f3717ad968b68b5cdbf4e9ca14d191a933f7.tar.gz
prosody-a5d6f3717ad968b68b5cdbf4e9ca14d191a933f7.zip
mod_s2s: Use stanza type check instead of duck typing
-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);