From d2602c7935c682f0ddd173053e14ec96212960c9 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 24 Jun 2018 19:40:53 +1000 Subject: [PATCH] Write received chunks that we don't have Chunks were discarded if they belong to unprioritized pieces, even if those pieces were previously prioritized. May be contributing to #253. --- connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.go b/connection.go index e5075887..53bf2116 100644 --- a/connection.go +++ b/connection.go @@ -1228,7 +1228,7 @@ func (c *connection) receiveChunk(msg *pp.Message) { } // Do we actually want this chunk? - if !t.wantPiece(req) { + if t.haveChunk(req) { torrent.Add("chunks received unwanted", 1) c.allStats(add(1, func(cs *ConnStats) *Count { return &cs.ChunksReadUnwanted })) return -- 2.50.0