]> Sergey Matveev's repositories - btrtrc.git/commitdiff
No longer wanting a piece wasn't triggering an update of connection request state
authorMatt Joiner <anacrolix@gmail.com>
Thu, 17 Aug 2017 15:44:20 +0000 (01:44 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 17 Aug 2017 15:44:20 +0000 (01:44 +1000)
Pretty minor, but it would leave connections hanging in the interested state.

connection.go

index 575917bcd7a7e04c9e5458352118e4b84457d187..39fc46cbbf8e59eda974df978b6d9a9eb1c521c8 100644 (file)
@@ -528,6 +528,7 @@ func (c *connection) requestPiecePendingChunks(piece int) (again bool) {
 
 func (cn *connection) stopRequestingPiece(piece int) {
        cn.pieceRequestOrder.Remove(piece)
+       cn.updateRequests()
 }
 
 // This is distinct from Torrent piece priority, which is the user's