aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-18 20:37:40 +0100
committerKim Alvefur <zash@zash.se>2019-11-18 20:37:40 +0100
commit4216970602aaf459c0f3b0f408eae7d6239f6861 (patch)
treee39dbdcb1f7a25821d11ec5ca9915a438df34825 /plugins/mod_s2s
parent970ac1aa6c95fd9d8d1f2de01388dcc5113ef296 (diff)
downloadprosody-4216970602aaf459c0f3b0f408eae7d6239f6861.tar.gz
prosody-4216970602aaf459c0f3b0f408eae7d6239f6861.zip
mod_s2s: Wait for remote to close any connection allowing incoming stanzas
Ie both s2sin and bidi-enabled s2sout.
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 9db13cb7..7ee88f3e 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -533,7 +533,7 @@ local function session_close(session, reason, remote_reason)
-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote
local conn = session.conn;
- if reason == nil and not session.notopen and session.type == "s2sin" then
+ if reason == nil and not session.notopen and session.incoming then
add_task(stream_close_timeout, function ()
if not session.destroyed then
session.log("warn", "Failed to receive a stream close response, closing connection anyway...");