mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-11 08:30:55 +00:00
Fix BunchedCommand replies
This commit is contained in:
parent
7ca2d186af
commit
443a658af2
1 changed files with 8 additions and 7 deletions
|
@ -461,17 +461,18 @@ func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg Clien
|
||||||
client.MsgChannelKeepalive.Add(1)
|
client.MsgChannelKeepalive.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
result := <-resultCh
|
result := <-resultCh
|
||||||
var msg ClientMessage
|
var reply ClientMessage
|
||||||
if result.Err != nil {
|
if result.Err != nil {
|
||||||
msg.Command = ErrorCommand
|
reply.Command = ErrorCommand
|
||||||
msg.Arguments = result.Err.Error()
|
reply.Arguments = result.Err.Error()
|
||||||
} else {
|
} else {
|
||||||
msg.Command = SuccessCommand
|
reply.Command = SuccessCommand
|
||||||
msg.origArguments = result.Val.(string)
|
reply.MessageID = msg.MessageID
|
||||||
msg.parseOrigArguments()
|
reply.origArguments = result.Val.(string)
|
||||||
|
reply.parseOrigArguments()
|
||||||
}
|
}
|
||||||
|
|
||||||
client.Send(msg)
|
client.Send(reply)
|
||||||
client.MsgChannelKeepalive.Done()
|
client.MsgChannelKeepalive.Done()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue