diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-04-17 17:06:55 +0200 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-04-17 11:06:55 -0400 |
commit | 51a6e95f58abd65b454e365d45a510eefd84bfe3 (patch) | |
tree | f591a340e446f4b96baf4774957ab43895949811 /app/user.go | |
parent | 5511106d93a16626290763e8772b8b562f22100d (diff) | |
download | chat-51a6e95f58abd65b454e365d45a510eefd84bfe3.tar.gz chat-51a6e95f58abd65b454e365d45a510eefd84bfe3.tar.bz2 chat-51a6e95f58abd65b454e365d45a510eefd84bfe3.zip |
add app shutdown to make sure the goroutines finish and all process are closed (#8629)
* run the send email verification as goroutine as well
* add app shutdown to make sure all go routines finish
Diffstat (limited to 'app/user.go')
-rw-r--r-- | app/user.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/user.go b/app/user.go index b3f7c8c58..21165fdba 100644 --- a/app/user.go +++ b/app/user.go @@ -1043,9 +1043,11 @@ func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User, }) if a.Config().EmailSettings.RequireEmailVerification { - if err := a.SendEmailVerification(rusers[0]); err != nil { - l4g.Error(err.Error()) - } + a.Go(func() { + if err := a.SendEmailVerification(rusers[0]); err != nil { + l4g.Error(err.Error()) + } + }) } } |