Skip to content

Commit

Permalink
Add one more context guard
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
  • Loading branch information
Kubuxu committed Jun 24, 2024
1 parent 14b0bb2 commit 4426adf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions node/modules/storageminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ func F3Participation(mctx helpers.MetricsCtx, lc fx.Lifecycle, api v1api.FullNod
}
go func() {
for {
if ctx.Err() != nil {
return
}
ch, err := api.F3Participate(ctx, address.Address(minerAddress))

if errors.Is(err, context.Canceled) {
Expand All @@ -381,6 +384,7 @@ func F3Participation(mctx helpers.MetricsCtx, lc fx.Lifecycle, api v1api.FullNod
}
}
log.Info("F3Participate exited, retrying")
time.Sleep(b.Duration())
}
}()
return nil
Expand Down

0 comments on commit 4426adf

Please sign in to comment.