plugins/mod_s2s.lua
changeset 11421 f84005d06663
parent 11419 a38f9e09ca31
child 11423 2c26dfc1977f
--- a/plugins/mod_s2s.lua	Tue Mar 02 22:57:20 2021 +0100
+++ b/plugins/mod_s2s.lua	Wed Mar 03 13:26:38 2021 +0100
@@ -542,7 +542,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.incoming then
+		if reason == nil and not session.notopen and session.direction == "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...");