summaryrefslogtreecommitdiffstats
path: root/app/command_echo.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-03 10:53:53 -0500
committerGitHub <noreply@github.com>2017-10-03 10:53:53 -0500
commit5e69ce099f521aa49fc267c62235c003eae530ff (patch)
treec7177e4cac419082753225819f62d07c8b5671e8 /app/command_echo.go
parentbfe7955fb0c72bb6f3e0a1e0aaca70cff27d7ddc (diff)
downloadchat-5e69ce099f521aa49fc267c62235c003eae530ff.tar.gz
chat-5e69ce099f521aa49fc267c62235c003eae530ff.tar.bz2
chat-5e69ce099f521aa49fc267c62235c003eae530ff.zip
Goroutine wranglin (#7556)
* goroutine wranglin * synchronize WebConn.WritePump
Diffstat (limited to 'app/command_echo.go')
-rw-r--r--app/command_echo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/command_echo.go b/app/command_echo.go
index 61a24b59a..404736aa4 100644
--- a/app/command_echo.go
+++ b/app/command_echo.go
@@ -77,7 +77,7 @@ func (me *EchoProvider) DoCommand(a *App, args *model.CommandArgs, message strin
}
echoSem <- true
- go func() {
+ a.Go(func() {
defer func() { <-echoSem }()
post := &model.Post{}
post.ChannelId = args.ChannelId
@@ -91,7 +91,7 @@ func (me *EchoProvider) DoCommand(a *App, args *model.CommandArgs, message strin
if _, err := a.CreatePostMissingChannel(post, true); err != nil {
l4g.Error(args.T("api.command_echo.create.app_error"), err)
}
- }()
+ })
return &model.CommandResponse{}
}