diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-03 10:53:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-03 10:53:53 -0500 |
commit | 5e69ce099f521aa49fc267c62235c003eae530ff (patch) | |
tree | c7177e4cac419082753225819f62d07c8b5671e8 /app/oauth.go | |
parent | bfe7955fb0c72bb6f3e0a1e0aaca70cff27d7ddc (diff) | |
download | chat-5e69ce099f521aa49fc267c62235c003eae530ff.tar.gz chat-5e69ce099f521aa49fc267c62235c003eae530ff.tar.bz2 chat-5e69ce099f521aa49fc267c62235c003eae530ff.zip |
Goroutine wranglin (#7556)
* goroutine wranglin
* synchronize WebConn.WritePump
Diffstat (limited to 'app/oauth.go')
-rw-r--r-- | app/oauth.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/oauth.go b/app/oauth.go index cd45b0c10..be0535f35 100644 --- a/app/oauth.go +++ b/app/oauth.go @@ -535,11 +535,11 @@ func (a *App) CompleteSwitchWithOAuth(service string, userData io.ReadCloser, em return nil, result.Err } - go func() { + a.Go(func() { if err := SendSignInChangeEmail(user.Email, strings.Title(service)+" SSO", user.Locale, utils.GetSiteURL()); err != nil { l4g.Error(err.Error()) } - }() + }) return user, nil } @@ -770,11 +770,11 @@ func (a *App) SwitchOAuthToEmail(email, password, requesterId string) (string, * T := utils.GetUserTranslations(user.Locale) - go func() { + a.Go(func() { if err := SendSignInChangeEmail(user.Email, T("api.templates.signin_change_email.body.method_email"), user.Locale, utils.GetSiteURL()); err != nil { l4g.Error(err.Error()) } - }() + }) if err := a.RevokeAllSessions(requesterId); err != nil { return "", err |