Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ The following emojis are used to highlight certain changes:

### Changed

- `provider` don't call the reprovide throughput callback function when reprovides are disabled [#871](https://github.com/ipfs/boxo/pull/871)

### Removed

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion provider/reprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func (s *reprovider) run() {

s.throughputDurationSum += dur
s.throughputProvideCurrentCount += uint(len(keys))
if s.throughputCallback != nil && s.throughputProvideCurrentCount >= s.throughputMinimumProvides {
if s.throughputCallback != nil && s.reprovideInterval > 0 && s.throughputProvideCurrentCount >= s.throughputMinimumProvides {
if more := s.throughputCallback(performedReprovide, complete, s.throughputProvideCurrentCount, s.throughputDurationSum); !more {
s.throughputCallback = nil
}
Expand Down
Loading