Mercurial > prosody-hg
diff plugins/mod_bosh.lua @ 4526:cdab466551bd
mod_bosh: Log error on BOSH parse failure (thanks daurnimator)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 19 Apr 2012 19:30:47 +0100 |
| parents | e4d88f4a780c |
| children | d00f31470fcf |
line wrap: on
line diff
--- a/plugins/mod_bosh.lua Mon Mar 05 22:11:29 2012 +0100 +++ b/plugins/mod_bosh.lua Thu Apr 19 19:30:47 2012 +0100 @@ -121,7 +121,10 @@ 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
