aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index 19c94b2d..86bb0795 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -461,6 +461,11 @@ function stream_callbacks._streamopened(session, attr)
end
session:open_stream(session.to_host, session.from_host)
+ if session.destroyed then
+ -- sending the stream opening could have failed during an opportunistic write
+ return
+ end
+
session.notopen = nil;
if session.version >= 1.0 then
local features = st.stanza("stream:features");