mod_bosh: Skip sending stanzas removed out by filters (fixes #657)
authorKim Alvefur <zash@zash.se>
Fri, 01 Apr 2016 18:56:26 +0200
changeset 7329 d11701e86702
parent 7328 7baf1b14defb
child 7330 d62f0471470f
child 7332 ab811c1bb730
mod_bosh: Skip sending stanzas removed out by filters (fixes #657)
plugins/mod_bosh.lua
--- a/plugins/mod_bosh.lua	Fri Apr 01 15:56:12 2016 +0200
+++ b/plugins/mod_bosh.lua	Fri Apr 01 18:56:26 2016 +0200
@@ -279,6 +279,7 @@
 			end
 			s = filter("stanzas/out", s);
 			--log("debug", "Sending BOSH data: %s", tostring(s));
+			if not s then return true end
 			t_insert(session.send_buffer, tostring(s));
 
 			local oldest_request = r[1];