Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 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 |
parent | 10403:3b82e9df5a7a |
child | 10425:42cf93ff4618 |
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...");