Skip to content

Commit 4f9f071

Browse files
committed
Small fix to nonce worker
1 parent 76f836a commit 4f9f071

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/code/async/nonce/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ func (p *service) Start(ctx context.Context, interval time.Duration) error {
7272
for _, item := range []nonce.State{
7373
nonce.StateReleased,
7474
} {
75-
go func(state nonce.State) {
75+
go func(vm string, state nonce.State) {
7676

7777
err := p.worker(ctx, nonce.EnvironmentCvm, vm, state, interval)
7878
if err != nil && err != context.Canceled {
7979
p.log.WithError(err).Warnf("nonce processing loop terminated unexpectedly for env %s, instance %s, state %d", nonce.EnvironmentCvm, vm, state)
8080
}
8181

82-
}(item)
82+
}(vm, item)
8383
}
8484
}
8585

0 commit comments

Comments
 (0)