aboutsummaryrefslogtreecommitdiffstats
path: root/net/websocket
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-09-29 13:58:32 +0100
committerMatthew Wild <mwild1@gmail.com>2020-09-29 13:58:32 +0100
commita0fb8d876f7b962866543042821db4f95011e931 (patch)
tree7e28d1987edb00b4ce1ff58656e0bd984dee1784 /net/websocket
parent71256641f4f1603b9c70af0aec010fa98923e7a4 (diff)
downloadprosody-a0fb8d876f7b962866543042821db4f95011e931.tar.gz
prosody-a0fb8d876f7b962866543042821db4f95011e931.zip
net.websocket.frames: Additionally return partial frame if there is one
Diffstat (limited to 'net/websocket')
-rw-r--r--net/websocket/frames.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/websocket/frames.lua b/net/websocket/frames.lua
index 65f9122c..a0c0d4cd 100644
--- a/net/websocket/frames.lua
+++ b/net/websocket/frames.lua
@@ -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