aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-19 19:30:47 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-19 19:30:47 +0100
commit01fbb05094892e35809b1da9d3778809a70c5e62 (patch)
tree0cf2494e2f22b4ad0d458675f8296e61a47d3b33 /plugins/mod_bosh.lua
parent6d4dea87b271b2b7aafddb96dd42c0dfcbf11b55 (diff)
downloadprosody-01fbb05094892e35809b1da9d3778809a70c5e62.tar.gz
prosody-01fbb05094892e35809b1da9d3778809a70c5e62.zip
mod_bosh: Log error on BOSH parse failure (thanks daurnimator)
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r--plugins/mod_bosh.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 834b128a..7b1d8800 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -121,7 +121,10 @@ function handle_request(method, body, request)
local stream = new_xmpp_stream(request, stream_callbacks);
-- stream:feed() calls the stream_callbacks, so all stanzas in
-- the body are processed in this next line before it returns.
- stream:feed(body);
+ local ok, err = stream:feed(body);
+ if not ok then
+ log("error", "Failed to parse BOSH payload: %s", err);
+ end
local session = sessions[request.sid];
if session then