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:
parent
1fdef8b846
commit
601b5501a7
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue