aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-23 01:29:03 +0100
committerKim Alvefur <zash@zash.se>2019-11-23 01:29:03 +0100
commit3aee8e24a6873fce6b7ab30f5b87d17089e0d5a6 (patch)
tree60f04ed9cdc074643bcc84b932c83ce8b120ea45 /plugins
parente130b377970996b9eb3d36c74db121835ed0a57e (diff)
downloadprosody-3aee8e24a6873fce6b7ab30f5b87d17089e0d5a6.tar.gz
prosody-3aee8e24a6873fce6b7ab30f5b87d17089e0d5a6.zip
s2s: Allow passing a custom error for bouncing queued stanzas (#770)
Since stream errors and stanza errors are different
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 7ee88f3e..6bb444f5 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -487,7 +487,7 @@ end
--- Session methods
local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'};
-local function session_close(session, reason, remote_reason)
+local function session_close(session, reason, remote_reason, bounce_reason)
local log = session.log or log;
if session.conn then
if session.notopen then
@@ -537,12 +537,12 @@ local function session_close(session, reason, remote_reason)
add_task(stream_close_timeout, function ()
if not session.destroyed then
session.log("warn", "Failed to receive a stream close response, closing connection anyway...");
- s2s_destroy_session(session, reason);
+ s2s_destroy_session(session, reason, bounce_reason);
conn:close();
end
end);
else
- s2s_destroy_session(session, reason);
+ s2s_destroy_session(session, reason, bounce_reason);
conn:close(); -- Close immediately, as this is an outgoing connection or is not authed
end
end