Skip to content

Commit

Permalink
fix: skip providing if the key set is empty after removing invalid CIDs
Browse files Browse the repository at this point in the history
This commit was moved from ipfs/go-ipfs-provider@28e02d7
  • Loading branch information
aschmahmann committed May 25, 2021
1 parent f0e1f08 commit 6e24903
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions provider/batched/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ func (s *BatchProvidingSystem) Run() {
keys = append(keys, c.Hash())
}

// in case after removing all the invalid CIDs there are no valid ones left
if len(keys) == 0 {
continue
}

for !s.rsys.Ready() {
log.Debugf("reprovider system not ready")
select {
Expand Down

0 comments on commit 6e24903

Please sign in to comment.