From: Kim Alvefur Date: Tue, 19 Apr 2016 10:15:20 +0000 (+0200) Subject: mod_bosh: Log error returned from stream:feed() X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=5aec97f88fef989401cb00e3b7534533409084ee;p=prosody.git mod_bosh: Log error returned from stream:feed() --- diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index ce51ccc5..845df61a 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -126,8 +126,9 @@ function handle_POST(event) -- 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