From 692facdebb83caaa4a3fdaff8a32ca79cfeeed06 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 25 Jan 2018 17:43:33 +1100 Subject: [PATCH] Add TODO --- reader.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reader.go b/reader.go index 105e1f19..4b96414c 100644 --- a/reader.go +++ b/reader.go @@ -222,6 +222,8 @@ func (r *reader) readOnceAt(b []byte, pos int64, ctxErr *error) (n int, err erro return } r.t.cl.mu.Lock() + // TODO: Just reset pieces in the readahead window. This might help + // prevent thrashing with small caches and file and piece priorities. log.Printf("error reading torrent %q piece %d offset %d, %d bytes: %s", r.t, pi, po, len(b1), err) r.t.updateAllPieceCompletions() r.t.updateAllPiecePriorities() -- 2.48.1