From 8460485ee0ab18d480d45d427445e2862c21c3d6 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Wed, 7 Sep 2016 19:32:29 +0100 Subject: mod_bosh: Save last response in case retransmission is required --- plugins/mod_bosh.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index c9d8008e..494d11b0 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -335,7 +335,8 @@ function stream_callbacks.streamopened(context, attr) 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)..""); + session.bosh_last_response = st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer)..""; + oldest_request:send(session.bosh_last_response); session.send_buffer = {}; end return true; -- cgit v1.2.3