1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

Fix BunchedCommand replies

This commit is contained in:
Kane York 2017-09-15 13:58:13 -07:00
parent 7ca2d186af
commit 443a658af2

View file

@ -461,17 +461,18 @@ func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg Clien
client.MsgChannelKeepalive.Add(1)
go func() {
result := <-resultCh
var msg ClientMessage
var reply ClientMessage
if result.Err != nil {
msg.Command = ErrorCommand
msg.Arguments = result.Err.Error()
reply.Command = ErrorCommand
reply.Arguments = result.Err.Error()
} else {
msg.Command = SuccessCommand
msg.origArguments = result.Val.(string)
msg.parseOrigArguments()
reply.Command = SuccessCommand
reply.MessageID = msg.MessageID
reply.origArguments = result.Val.(string)
reply.parseOrigArguments()
}
client.Send(msg)
client.Send(reply)
client.MsgChannelKeepalive.Done()
}()