net.websocket.frames: Additionally return partial frame if there is one

This commit is contained in:
Matthew Wild 2020-09-29 13:58:32 +01:00
parent 71256641f4
commit a0fb8d876f

View file

@ -141,7 +141,7 @@ end
local function parse_frame(frame)
local result, pos = parse_frame_header(frame);
if result == nil or #frame < (pos + result.length) then return; end
if result == nil or #frame < (pos + result.length) then return nil, nil, result; end
result.data = parse_frame_body(frame, result, pos+1);
return result, pos + result.length;
end