diff --git a/cmd/lotus-worker/main.go b/cmd/lotus-worker/main.go index 35364126487..286cce883bc 100644 --- a/cmd/lotus-worker/main.go +++ b/cmd/lotus-worker/main.go @@ -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 { diff --git a/cmd/lotus-worker/sealworker/rpc.go b/cmd/lotus-worker/sealworker/rpc.go index 613a580818e..5d1b963ffec 100644 --- a/cmd/lotus-worker/sealworker/rpc.go +++ b/cmd/lotus-worker/sealworker/rpc.go @@ -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