From 41ebef80e63e5113084e4cbfbf7d41fc24078812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 3 Jun 2024 20:46:59 +0200 Subject: [PATCH] fix: storage: Fix a race in GenerateWindowPoStAdv (#12064) --- storage/sealer/worker_local.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/sealer/worker_local.go b/storage/sealer/worker_local.go index 2a49447a2..82f939b10 100644 --- a/storage/sealer/worker_local.go +++ b/storage/sealer/worker_local.go @@ -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