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.
This commit is contained in:
Matt Joiner 2018-06-24 19:40:53 +10:00
parent ad03e64722
commit d2602c7935
1 changed files with 1 additions and 1 deletions

View File

@ -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