projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad03e64
)
Write received chunks that we don't have
author
Matt Joiner <anacrolix@gmail.com>
Sun, 24 Jun 2018 09:40:53 +0000 (19:40 +1000)
committer
Matt Joiner <anacrolix@gmail.com>
Sun, 24 Jun 2018 09:40:53 +0000 (19:40 +1000)
Chunks were discarded if they belong to unprioritized pieces, even if those pieces were previously prioritized. May be contributing to #253.
connection.go
patch
|
blob
|
history
diff --git
a/connection.go
b/connection.go
index e5075887accc5921a05d7d3ff01403aa7c0f0164..53bf211681b6b74abe463fdf2cd7db568c086562 100644
(file)
--- 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