Changeset

7376:f9a5d9f60561

mod_bosh: Log error returned from stream:feed()
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 12:15:20 +0200
parents 7375:6ae3cf899b25
children 7377:6c98e783272a
files plugins/mod_bosh.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_bosh.lua	Tue Apr 19 12:14:07 2016 +0200
+++ b/plugins/mod_bosh.lua	Tue Apr 19 12:15:20 2016 +0200
@@ -126,8 +126,9 @@
 	-- In particular, the streamopened() stream callback is where
 	-- much of the session logic happens, because it's where we first
 	-- get to see the 'sid' of this request.
-	if not stream:feed(body) then
-		module:log("warn", "Error parsing BOSH payload")
+	local ok, err = stream:feed(body);
+	if not ok then
+		module:log("warn", "Error parsing BOSH payload; %s", err)
 		return 400;
 	end