1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-02 16:08:31 +00:00

NotLikeThis

This commit is contained in:
Kane York 2017-09-15 13:41:18 -07:00
parent 18aa5855d5
commit 9594bda74a
2 changed files with 3 additions and 3 deletions

View file

@ -451,7 +451,7 @@ var bunchGroup singleflight.Group
// C2SHandleBunchedCommand handles C2S Commands such as `get_link`. // C2SHandleBunchedCommand handles C2S Commands such as `get_link`.
// It makes a request to the backend server for the data, but any other requests coming in while the first is pending also get the responses from the first one. // It makes a request to the backend server for the data, but any other requests coming in while the first is pending also get the responses from the first one.
func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg ClientMessage, err error) { func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (ClientMessage, error) {
key := fmt.Sprintf("%s:%s", msg.Command, msg.origArguments) key := fmt.Sprintf("%s:%s", msg.Command, msg.origArguments)
resultCh := bunchGroup.DoChan(key, func() (interface{}, error) { resultCh := bunchGroup.DoChan(key, func() (interface{}, error) {
@ -464,7 +464,7 @@ func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg Clien
var msg ClientMessage var msg ClientMessage
if result.Err != nil { if result.Err != nil {
msg.Command = ErrorCommand msg.Command = ErrorCommand
msg.Arguments = err.Error() msg.Arguments = result.Err.Error()
} else { } else {
msg.Command = SuccessCommand msg.Command = SuccessCommand
msg.origArguments = result.Val.(string) msg.origArguments = result.Val.(string)

View file

@ -27,7 +27,7 @@ type StatsData struct {
} }
CurrentClientCount uint64 CurrentClientCount uint64
LiveClientCount uint64 LiveClientCount uint64
PubSubChannelCount int PubSubChannelCount int