Skip to content

Commit

Permalink
http/websocket: fix mid-size frames sometimes failing to be received (f…
Browse files Browse the repository at this point in the history
…ixes #140)
  • Loading branch information
LBPHacker committed Jan 17, 2022
1 parent 169c1a7 commit 217300f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http/websocket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ local function read_frame(sock, deadline)
if frame.length == 126 then
extra_fill_unget = assert(sock:xread(2, "b", 0))
frame.length = sunpack(">I2", extra_fill_unget)
fill_length = fill_length - 2
fill_length = fill_length - 2 + frame.length
elseif frame.length == 127 then
extra_fill_unget = assert(sock:xread(8, "b", 0))
frame.length = sunpack(">I8", extra_fill_unget)
Expand Down

0 comments on commit 217300f

Please sign in to comment.