plugins/mod_websocket.lua
changeset 7317 e327e5b592f5
parent 7297 5f4d0753c818
child 7318 4fd984d1e445
equal deleted inserted replaced
7315:b4e99602ae75 7317:e327e5b592f5
   224 			return;
   224 			return;
   225 		elseif opcode == 0x9 then -- Ping frame
   225 		elseif opcode == 0x9 then -- Ping frame
   226 			frame.opcode = 0xA;
   226 			frame.opcode = 0xA;
   227 			conn:write(build_frame(frame));
   227 			conn:write(build_frame(frame));
   228 			return "";
   228 			return "";
   229 		elseif opcode == 0xA then -- Pong frame
   229 		elseif opcode == 0xA then -- Pong frame, MAY be sent unsolicited, eg as keepalive
   230 			module:log("warn", "Received unexpected pong frame: " .. tostring(frame.data));
       
   231 			return "";
   230 			return "";
   232 		else
   231 		else
   233 			log("warn", "Received frame with unsupported opcode %i", opcode);
   232 			log("warn", "Received frame with unsupported opcode %i", opcode);
   234 			return "";
   233 			return "";
   235 		end
   234 		end