Mercurial > prosody-modules
diff mod_websocket/mod_websocket.lua @ 1397:4e36b68d68da
mod_websocket: Handle pong messages
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Mon, 28 Apr 2014 23:23:45 +0200 |
parents | cc77341af5ee |
children |
line wrap: on
line diff
--- a/mod_websocket/mod_websocket.lua Sun Apr 27 01:43:43 2014 +0200 +++ b/mod_websocket/mod_websocket.lua Mon Apr 28 23:23:45 2014 +0200 @@ -319,6 +319,9 @@ frame.opcode = 0xA; conn:write(build_frame(frame)); return ""; + elseif opcode == 0xA then -- Pong frame + module:log("warn", "Received unexpected pong frame: " .. tostring(frame.data)); + return ""; else log("warn", "Received frame with unsupported opcode %i", opcode); return "";