plugins/mod_c2s.lua
changeset 11521 f7275c2c58fa
parent 11518 11186af62c87
child 11528 6de302b53a3e
--- a/plugins/mod_c2s.lua	Wed Apr 14 15:21:13 2021 +0200
+++ b/plugins/mod_c2s.lua	Wed Apr 14 16:02:47 2021 +0200
@@ -92,6 +92,9 @@
 
 	session:open_stream(host, attr.from);
 
+	-- Opening the stream can cause the stream to be closed
+	if session.destroyed then return end
+
 	(session.log or log)("debug", "Sent reply <stream:stream> to client");
 	session.notopen = nil;