Don't delete requests if we're choked per BEP 6
This should make the expected receive chunk counts match up more correctly. It doesn't seem to affect tests at the moment, but then we don't verify the expected receive chunk counts are correct either.
This commit is contained in:
parent
12e377e3fe
commit
86d5ad4b2c
|
@ -1040,7 +1040,9 @@ func (c *PeerConn) mainReadLoop() (err error) {
|
|||
switch msg.Type {
|
||||
case pp.Choke:
|
||||
c.peerChoking = true
|
||||
c.deleteAllRequests()
|
||||
if !c.fastEnabled() {
|
||||
c.deleteAllRequests()
|
||||
}
|
||||
// We can then reset our interest.
|
||||
c.updateRequests()
|
||||
c.updateExpectingChunks()
|
||||
|
|
Loading…
Reference in New Issue