From: Matt Joiner Date: Tue, 9 Feb 2016 13:47:53 +0000 (+1100) Subject: Still update a connections piece priority even if the peer doesn't have the piece X-Git-Tag: v1.0.0~896 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5b5ecb8f3bbcbfce1db53b46d5643d125717209a;p=btrtrc.git Still update a connections piece priority even if the peer doesn't have the piece --- diff --git a/connection.go b/connection.go index a140e24c..85f99e79 100644 --- a/connection.go +++ b/connection.go @@ -585,10 +585,10 @@ func (c *connection) stopRequestingPiece(piece int) { } func (c *connection) updatePiecePriority(piece int) { + tpp := c.t.piecePriority(piece) if !c.PeerHasPiece(piece) { - return + tpp = PiecePriorityNone } - tpp := c.t.piecePriority(piece) if tpp == PiecePriorityNone { c.stopRequestingPiece(piece) return