ws没有连接上时不再会向队列里push消息

This commit is contained in:
MrZ626
2021-06-19 14:06:39 +08:00
parent 4c95f6bfbc
commit 3b675ad8ed

View File

@@ -310,7 +310,7 @@ local OPname={
}
function WS.send(name,message,op)
local ws=wsList[name]
if ws.real then
if ws.real and ws.status=='running'then
ws.sendCHN:push(op and OPcode[op]or 2)--2=binary
ws.sendCHN:push(message)
ws.lastPingTime=timer()