Skip to content

Commit

Permalink
Merge pull request ipfs/go-ipfs-provider#37 from ipfs/fix/provide-man…
Browse files Browse the repository at this point in the history
…y-empty-keys

Fix batched providing of empty keys

This commit was moved from ipfs/go-ipfs-provider@549fe53
  • Loading branch information
aschmahmann committed May 27, 2021
2 parents f0e1f08 + 6e24903 commit 1a1d5e1
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 1a1d5e1

Please sign in to comment.