1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

Fix multithreaded call to SendMessage()

This commit is contained in:
Kane York 2015-10-29 00:17:13 -07:00
parent 1fdef8b846
commit 601b5501a7

View file

@ -319,9 +319,9 @@ func HandleRemoteCommand(conn *websocket.Conn, client *ClientInfo, msg ClientMes
resp, err := RequestRemoteDataCached(string(msg.Command), msg.origArguments, authInfo)
if err != nil {
SendMessage(conn, ClientMessage{MessageID: msg.MessageID, Command: ErrorCommand, Arguments: err.Error()})
client.MessageChannel <- ClientMessage{MessageID: msg.MessageID, Command: ErrorCommand, Arguments: err.Error()}
} else {
SendMessage(conn, ClientMessage{MessageID: msg.MessageID, Command: SuccessCommand, origArguments: resp})
client.MessageChannel <- ClientMessage{MessageID: msg.MessageID, Command: SuccessCommand, origArguments: resp}
}
}(conn, msg, client.AuthInfo)