Skip to content

Commit

Permalink
satellite/payments/stripe: loop variable capture
Browse files Browse the repository at this point in the history
Change-Id: Ia2e0cf329f2ff46394b21bad9581e430e0202ead
  • Loading branch information
jtolio committed Nov 8, 2023
1 parent ae945b9 commit 00cb237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions satellite/payments/stripe/service.go
Expand Up @@ -837,7 +837,7 @@ func (service *Service) createInvoices(ctx context.Context, customers []Customer
var mu sync.Mutex

for _, cus := range customers {
cusID := cus.ID
cus := cus
limiter.Go(ctx, func() {
if inactive, err := service.isUserInactive(ctx, cus.UserID); err != nil {
mu.Lock()
Expand All @@ -848,7 +848,7 @@ func (service *Service) createInvoices(ctx context.Context, customers []Customer
return
}

inv, err := service.createInvoice(ctx, cusID, period)
inv, err := service.createInvoice(ctx, cus.ID, period)
if err != nil {
mu.Lock()
errGrp.Add(err)
Expand Down

0 comments on commit 00cb237

Please sign in to comment.