From 51a6e95f58abd65b454e365d45a510eefd84bfe3 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Tue, 17 Apr 2018 17:06:55 +0200 Subject: 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 --- app/user.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/user.go') 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()) + } + }) } } -- cgit v1.2.3-1-g7c22