mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
fix lock
This commit is contained in:
parent
f258b010b9
commit
73774681af
@ -334,14 +334,12 @@ func (c *websocketConn) handleRequest(bot *coolq.CQBot, payload []byte) {
|
||||
defer c.Unlock()
|
||||
_ = c.WriteJSON(ret)
|
||||
} else {
|
||||
ret := global.MSG{
|
||||
"status": "failed",
|
||||
"retcode": 1404,
|
||||
"data": nil,
|
||||
}
|
||||
ret := coolq.Failed(1404,"API_NOT_FOUND","API不存在")
|
||||
if j.Get("echo").Exists() {
|
||||
ret["echo"] = j.Get("echo").Value()
|
||||
}
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
_ = c.WriteJSON(ret)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user