Diff

mod_bidi/mod_bidi.lua @ 1126:6fd328b8e136

mod_bidi: Don't try to send on destroyed sessions
author Kim Alvefur <zash@zash.se>
date Sat, 03 Aug 2013 00:51:00 +0200
parent 1125:901e361af918
child 1127:38e56be11584
line wrap: on
line diff
--- a/mod_bidi/mod_bidi.lua	Sat Aug 03 00:35:20 2013 +0200
+++ b/mod_bidi/mod_bidi.lua	Sat Aug 03 00:51:00 2013 +0200
@@ -59,7 +59,7 @@
 	local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza;
 	if from_host ~= module.host then return end
 	local to_session = bidi_sessions[to_host]
-	if not to_session then return end
+	if not to_session or to_session.type ~= "s2sin" then return end
 	return to_session.sends2s(stanza);
 end, -2);