~glacambre/firenvim

c8cd51c3e04a1b1a12cfa21b6b9aaf62c16b983f — glacambre 2 years ago bd3321c
lua/firenvim-websocket.lua: fix websocket pong
1 files changed, 6 insertions(+), 2 deletions(-)

M lua/firenvim-websocket.lua
M lua/firenvim-websocket.lua => lua/firenvim-websocket.lua +6 -2
@@ 138,11 138,15 @@ local function encode_frame(data)
end

local function pong_frame(decoded_frame)
        -- 137: 10001010
        -- 138: 10001010
        -- Fin: 1
        -- RSV{1,2,3}: 0
        -- Opcode: 0xA (pong)
        return string.char(138) .. decoded_frame.payload_length .. decoded_frame.payload_data
        local payload = ""
        if decoded_frame.payload_data ~= nil then
                payload = decoded_frame.payload_data
        end
        return string.char(138) .. decoded_frame.payload_length .. payload
end

local function close_frame()