mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
perf: log long string
This commit is contained in:
parent
e4508ea5c7
commit
ebea755731
@ -35,10 +35,10 @@ export class ReverseWebsocket {
|
||||
public async onmessage(msg: string) {
|
||||
let receiveData: { action: ActionName, params: any, echo?: string } = {action: null, params: {}}
|
||||
let echo = ""
|
||||
log("收到反向Websocket消息", msg)
|
||||
try {
|
||||
receiveData = JSON.parse(msg.toString())
|
||||
echo = receiveData.echo
|
||||
log("收到反向Websocket消息", receiveData)
|
||||
} catch (e) {
|
||||
return wsReply(this.websocket, OB11Response.error("json解析失败,请检查数据格式", 1400, echo))
|
||||
}
|
||||
|
@ -36,10 +36,10 @@ class OB11WebsocketServer extends WebsocketServerBase {
|
||||
wsClient.on("message", async (msg) => {
|
||||
let receiveData: { action: ActionName, params: any, echo?: string } = {action: null, params: {}}
|
||||
let echo = ""
|
||||
log("收到正向Websocket消息", msg)
|
||||
try {
|
||||
receiveData = JSON.parse(msg.toString())
|
||||
echo = receiveData.echo
|
||||
log("收到正向Websocket消息", receiveData);
|
||||
} catch (e) {
|
||||
return wsReply(wsClient, OB11Response.error("json解析失败,请检查数据格式", 1400, echo))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user