fix: storage: Fix a race in GenerateWindowPoStAdv (#12064)

This commit is contained in:
Łukasz Magiera 2024-06-03 20:46:59 +02:00 committed by GitHub
parent 0a51a0a219
commit 41ebef80e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -675,6 +675,8 @@ func (l *LocalWorker) GenerateWindowPoStAdv(ctx context.Context, ppt abi.Registe
go func(i int, s storiface.PostSectorChallenge) {
defer wg.Done()
ctx := ctx
defer func() {
if l.challengeThrottle != nil {
<-l.challengeThrottle