Skip to content

Commit

Permalink
ds printer
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jul 21, 2024
1 parent 77cfed7 commit aa4502c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions mmap_span/mmap_span.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ func (ms *MMapSpan) flushMaps(onFlush func(size int64), lock bool) (errs []error

if flushedCallback != nil {
flushedCallback(ms.InfoHash, dirtyPieces)
fmt.Println("FDS", onFlush, dirtySize)
if onFlush != nil {
onFlush(dirtySize)
}
}

fmt.Println("FDS", onFlush, dirtySize)

Check failure on line 90 in mmap_span/mmap_span.go

View workflow job for this annotation

GitHub Actions / test (1.21, windows-latest)

fmt.Println arg onFlush is a func value, not called

Check failure on line 90 in mmap_span/mmap_span.go

View workflow job for this annotation

GitHub Actions / test (1.21, macos-latest)

fmt.Println arg onFlush is a func value, not called

Check failure on line 90 in mmap_span/mmap_span.go

View workflow job for this annotation

GitHub Actions / bench (1.21)

fmt.Println arg onFlush is a func value, not called

Check failure on line 90 in mmap_span/mmap_span.go

View workflow job for this annotation

GitHub Actions / test-386 (1.21)

fmt.Println arg onFlush is a func value, not called

Check failure on line 90 in mmap_span/mmap_span.go

View workflow job for this annotation

GitHub Actions / test (1.21, ubuntu-latest)

fmt.Println arg onFlush is a func value, not called

Check failure on line 90 in mmap_span/mmap_span.go

View workflow job for this annotation

GitHub Actions / test-benchmarks (1.21)

fmt.Println arg onFlush is a func value, not called
if onFlush != nil {
onFlush(dirtySize)
}

return
Expand Down
2 changes: 1 addition & 1 deletion storage/mmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (ts *mmapTorrentStorage) Close() error {
}

func (ts *mmapTorrentStorage) Flush(onFlush func(size int64)) error {
errs := ts.span.Flush(nil)
errs := ts.span.Flush(onFlush)
if len(errs) > 0 {
return errs[0]
}
Expand Down

0 comments on commit aa4502c

Please sign in to comment.