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:
parent
ad03e64722
commit
d2602c7935
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue