Skip to content

Commit

Permalink
Add return value assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
Shrenuj Bansal authored and Shrenuj Bansal committed Aug 10, 2022
1 parent f390c18 commit 10dba44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/lotus-worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ var stopCmd = &cli.Command{
ctx := lcli.ReqContext(cctx)

// Detach any storage associated with this worker
api.StorageDetachAll(ctx)
err = api.StorageDetachAll(ctx)
if err != nil {
return err
}

err = api.Shutdown(ctx)
if err != nil {
Expand Down
5 changes: 4 additions & 1 deletion cmd/lotus-worker/sealworker/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ func (w *Worker) StorageDetachAll(ctx context.Context) error {
}

for _, lp := range lps {
w.LocalStore.ClosePath(ctx, lp.ID)
err = w.LocalStore.ClosePath(ctx, lp.ID)
if err != nil {
return xerrors.Errorf("unable to close path: %w", err)
}
}

return nil
Expand Down

0 comments on commit 10dba44

Please sign in to comment.