From 56100e5d507e807a45b4dee4cd09ebcd66c2276d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 1 Mar 2024 04:50:12 -0500 Subject: [PATCH] fix: shadow cid --- api/s5/s5.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/s5/s5.go b/api/s5/s5.go index a5f5c79..e4245f7 100644 --- a/api/s5/s5.go +++ b/api/s5/s5.go @@ -880,6 +880,7 @@ func (s *S5API) accountPinManifest(jc jape.Context, userId uint, cid *encoding.C results := make(map[string]pinResult, len(cids)) for i := 0; i < len(cids); i++ { + cid := cids[i] go func(cid *encoding.CID) { if err := q.QueueTask(func(ctx context.Context) error { ret := pinQueueResult{ @@ -904,7 +905,7 @@ func (s *S5API) accountPinManifest(jc jape.Context, userId uint, cid *encoding.C cid: cid, } } - }(cids[i]) + }(cid) } go func() {