Changeset

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 4517:2e274e088ddc
children 4527:d00f31470fcf 4793:eaa8991998d5
files plugins/mod_bosh.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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