From 4585da9cbd1daab379b282c952a6a6c5f7231920 Mon Sep 17 00:00:00 2001 From: Hanlei Qin Date: Mon, 30 Sep 2019 11:49:23 +0800 Subject: [PATCH] bug fixed --- lualib/http/websocket.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lualib/http/websocket.lua b/lualib/http/websocket.lua index b2bd6c89..49947109 100755 --- a/lualib/http/websocket.lua +++ b/lualib/http/websocket.lua @@ -119,6 +119,7 @@ local function read_handshake(self) local sw_protocol = header["sec-websocket-protocol"] local sub_pro = "" if sw_protocol then + local has_chat = false for sub_protocol in string.gmatch(sw_protocol, "[^%s,]+") do if sub_protocol == "chat" then sub_pro = "Sec-WebSocket-Protocol: chat\r\n"