From 5133c357dc5cb468c1e1f3c24628e617a4920fd7 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Wed, 4 Dec 2019 14:14:50 -0800 Subject: [PATCH] Better error checks --- storage/miner.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/miner.go b/storage/miner.go index 524319033..dcb6b1155 100644 --- a/storage/miner.go +++ b/storage/miner.go @@ -109,7 +109,11 @@ func (m *Miner) Run(ctx context.Context) error { } go fps.run(ctx) - go m.sectorStateLoop(ctx) + if err := m.sectorStateLoop(ctx); err != nil { + log.Error(err) + return xerrors.Errorf("failed to startup sector state loop: %w", err) + } + return nil }