From 68d8604c2090ec24b3cc80b0fc933486fadb5a0c Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 29 Jan 2021 16:14:08 +1100 Subject: [PATCH] We're not expecting chunks if we have no outstanding requests --- peerconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peerconn.go b/peerconn.go index 1b585233..cf9ace9d 100644 --- 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. -- 2.48.1