bug fixed

This commit is contained in:
Hanlei Qin
2019-09-30 11:49:23 +08:00
committed by 云风
parent 38c47b8a5d
commit 4585da9cbd

View File

@@ -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"