aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2016-09-07 19:32:29 +0100
committerSam Whited <sam@samwhited.com>2016-09-07 19:32:29 +0100
commit582a2180f2ebd07d084d85ffd3e7641565be6d2f (patch)
tree873c9f0bc2d3c0f0dbb650af96f2391fea77a9ff
parent24ffa3ba688dfebad3944a721b2cf98cb161855f (diff)
downloadprosody-582a2180f2ebd07d084d85ffd3e7641565be6d2f.tar.gz
prosody-582a2180f2ebd07d084d85ffd3e7641565be6d2f.zip
mod_bosh: Save last response in case retransmission is required
-rw-r--r--plugins/mod_bosh.lua3
1 files changed, 2 insertions, 1 deletions
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).."</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;