Software /
code /
prosody
Changeset
11417:f84005d06663
mod_s2s: Check direction in bidi-aware style
Both session.incoming and session.outgoing are truthy here, but
session.direction indicates the "real" direction in the way that matters
for the order of events when opening or closing streams.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 03 Mar 2021 13:26:38 +0100 |
parents | 11416:0a9d6eec6a8f |
children | 11418:f4b76e500768 |
files | plugins/mod_s2s.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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...");