diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-19 19:30:47 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-19 19:30:47 +0100 |
commit | f39d1cdd38dd84425c31d8f44972fde25c8d6f91 (patch) | |
tree | 0cf2494e2f22b4ad0d458675f8296e61a47d3b33 /plugins/mod_bosh.lua | |
parent | 9b41a236b0162a863c8417119795481814eb3c01 (diff) | |
download | prosody-f39d1cdd38dd84425c31d8f44972fde25c8d6f91.tar.gz prosody-f39d1cdd38dd84425c31d8f44972fde25c8d6f91.zip |
mod_bosh: Log error on BOSH parse failure (thanks daurnimator)
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r-- | plugins/mod_bosh.lua | 5 |
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 |