From c82bf220cf3bfd4157251dd923fca0f1e37d796e Mon Sep 17 00:00:00 2001 From: rxdn Date: Fri, 19 Jun 2020 21:26:24 +0100 Subject: [PATCH] fix loop race condition --- app/http/endpoints/api/panellist.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/http/endpoints/api/panellist.go b/app/http/endpoints/api/panellist.go index 86ce9b9..8e36efb 100644 --- a/app/http/endpoints/api/panellist.go +++ b/app/http/endpoints/api/panellist.go @@ -38,7 +38,8 @@ func ListPanels(ctx *gin.Context) { group, _ := errgroup.WithContext(context.Background()) for i, p := range panels { - group.Go(func() (err error) { + i := i + group.Go(func() error { var mentions []string // get role mentions