Changeset

10421:09b54ad0fdc4

mod_s2s: Wait for remote to close any connection allowing incoming stanzas Ie both s2sin and bidi-enabled s2sout.
author Kim Alvefur <zash@zash.se>
date Mon, 18 Nov 2019 20:37:40 +0100
parents 10420:49a828819696
children 10422:cb6c0a5f9367
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 Nov 17 23:47:31 2019 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua	Mon Nov 18 20:37:40 2019 +0100
@@ -533,7 +533,7 @@
 
 		-- 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...");