# HG changeset patch # User Kim Alvefur # Date 1574105860 -3600 # Node ID 09b54ad0fdc4f2cd25ceb760202d884f989dc293 # Parent 49a828819696a5509f0beaaee1586d6a53c4121c mod_s2s: Wait for remote to close any connection allowing incoming stanzas Ie both s2sin and bidi-enabled s2sout. diff -r 49a828819696 -r 09b54ad0fdc4 plugins/mod_s2s/mod_s2s.lua --- 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 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...");