修改可能导致ws尝试发送数字消息然后报错的一处代码
This commit is contained in:
@@ -86,9 +86,9 @@ local _send do
|
|||||||
local mask_key={1,14,5,14}
|
local mask_key={1,14,5,14}
|
||||||
local mask_str=char(unpack(mask_key))
|
local mask_str=char(unpack(mask_key))
|
||||||
|
|
||||||
function _send(opcode,message)
|
function _send(op,message)
|
||||||
--Message type
|
--Message type
|
||||||
SOCK:send(char(bor(0x80,opcode)))
|
SOCK:send(char(bor(0x80,op)))
|
||||||
|
|
||||||
if message then
|
if message then
|
||||||
--Length
|
--Length
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ function NET.register(username,email,password)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function NET.pong(wsName,message)
|
function NET.pong(wsName,message)
|
||||||
WS.send(wsName,message,"pong")
|
WS.send(wsName,type(message)=="string"and message or"","pong")
|
||||||
end
|
end
|
||||||
function NET.getAccessToken()
|
function NET.getAccessToken()
|
||||||
if NET.lock("access_and_login",10)then
|
if NET.lock("access_and_login",10)then
|
||||||
|
|||||||
Reference in New Issue
Block a user