From 3f66e731fa0c41047341540286be32d724a0d3f8 Mon Sep 17 00:00:00 2001 From: yaohcn Date: Thu, 18 Feb 2021 12:00:28 +0800 Subject: [PATCH] fix drop sector --- extern/sector-storage/stores/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extern/sector-storage/stores/index.go b/extern/sector-storage/stores/index.go index 9362a7504..4f3af552b 100644 --- a/extern/sector-storage/stores/index.go +++ b/extern/sector-storage/stores/index.go @@ -232,7 +232,7 @@ func (i *Index) StorageDropSector(ctx context.Context, storageID ID, s abi.Secto d := Decl{s, fileType} if len(i.sectors[d]) == 0 { - return nil + continue } rewritten := make([]*declMeta, 0, len(i.sectors[d])-1) @@ -245,7 +245,7 @@ func (i *Index) StorageDropSector(ctx context.Context, storageID ID, s abi.Secto } if len(rewritten) == 0 { delete(i.sectors, d) - return nil + continue } i.sectors[d] = rewritten