projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43a2942
)
We're not expecting chunks if we have no outstanding requests
author
Matt Joiner <anacrolix@gmail.com>
Fri, 29 Jan 2021 05:14:08 +0000 (16:14 +1100)
committer
Matt Joiner <anacrolix@gmail.com>
Fri, 29 Jan 2021 05:14:08 +0000 (16:14 +1100)
peerconn.go
patch
|
blob
|
history
diff --git
a/peerconn.go
b/peerconn.go
index 1b585233eb8b6b982abf26659c40469cca4a36f0..cf9ace9ddd31c72dda109d60a9f1248c1eb89dd2 100644
(file)
--- a/
peerconn.go
+++ b/
peerconn.go
@@
-167,7
+167,7
@@
func (cn *Peer) updateExpectingChunks() {
}
func (cn *Peer) expectingChunks() bool {
- return
cn.interested
&& !cn.peerChoking
+ return
len(cn.requests) != 0
&& !cn.peerChoking
}
// Returns true if the connection is over IPv6.