# HG changeset patch # User Matthew Wild # Date 1334860247 -3600 # Node ID cdab466551bd60aa0f2db1b5d1e7dbdc13b78579 # Parent 2e274e088ddcfa579c5b03c2c8ad2f9228f9aee6 mod_bosh: Log error on BOSH parse failure (thanks daurnimator) diff -r 2e274e088ddc -r cdab466551bd plugins/mod_bosh.lua --- 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