Diff

plugins/mod_bosh.lua @ 7659:449de852cf38

mod_bosh: Save last response in case retransmission is required
author Sam Whited <sam@samwhited.com>
date Wed, 07 Sep 2016 19:32:29 +0100
parent 7653:17e42f793341
child 7660:d2825ddaac19
child 8097:e24263db3380
line wrap: on
line diff
--- a/plugins/mod_bosh.lua	Fri Sep 02 22:13:54 2016 +0100
+++ b/plugins/mod_bosh.lua	Wed Sep 07 19:32:29 2016 +0100
@@ -335,7 +335,8 @@
 					body_attr["xmlns:xmpp"] = "urn:xmpp:xbosh";
 					body_attr["xmpp:version"] = "1.0";
 				end
-				oldest_request:send(st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer).."</body>");
+				session.bosh_last_response = st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer).."</body>";
+				oldest_request:send(session.bosh_last_response);
 				session.send_buffer = {};
 			end
 			return true;