mod_bosh: Fix traceback in case session is destroyed during the stream-features event (thanks Biszkopcik)
authorKim Alvefur <zash@zash.se>
Sun, 02 Jun 2013 19:25:53 +0200
changeset 5639 7a0e19e649b7
parent 5630 5f3c0b11aa88
child 5640 4f1889672063
child 5642 5862bb57a3f1
mod_bosh: Fix traceback in case session is destroyed during the stream-features event (thanks Biszkopcik)
plugins/mod_bosh.lua
--- a/plugins/mod_bosh.lua	Sun May 26 22:58:13 2013 +0200
+++ b/plugins/mod_bosh.lua	Sun Jun 02 19:25:53 2013 +0200
@@ -345,7 +345,7 @@
 		local features = st.stanza("stream:features");
 		hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
 		fire_event("stream-features", session, features);
-		table.insert(session.send_buffer, tostring(features));
+		session.send(tostring(features));
 		session.notopen = nil;
 	end
 end