修复不能正确解析来自服务器的切断ws消息
This commit is contained in:
@@ -188,8 +188,7 @@ while true do--Running
|
||||
readCHN:push(op)
|
||||
SOCK:close()
|
||||
if type(res)=='string'then
|
||||
res=JSON.decode(res)
|
||||
readCHN:push(res and res.reason or"WS Error")
|
||||
readCHN:push(res)--Warning: with 2 bytes close code
|
||||
else
|
||||
readCHN:push("WS Error")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user