c.peerChoking = true
// We can now reset our interest. I think we do this after setting the flag in case the
// peerImpl updates synchronously (webseeds?).
- c.updateRequests("choked")
+ if !c.actualRequestState.Requests.IsEmpty() {
+ c.updateRequests("choked")
+ }
c.updateExpectingChunks()
case pp.Unchoke:
if !c.peerChoking {
c.fastEnabled())
torrent.Add("requestsPreservedThroughChoking", int64(preservedCount))
}
- c.updateRequests("unchoked")
+ if !c.t._pendingPieces.IsEmpty() {
+ c.updateRequests("unchoked")
+ }
c.updateExpectingChunks()
case pp.Interested:
c.peerInterested = true