r.log(log.Fstr("error reading torrent %s piece %d offset %d, %d bytes: %v",
r.t.infoHash.HexString(), firstPieceIndex, firstPieceOffset, len(b1), err))
if !r.t.updatePieceCompletion(firstPieceIndex) {
- r.log(log.Fstr("piece %d completion unchanged", firstPieceIndex))
+ r.log(log.Fstr("piece %d completion unchanged (%+v)", firstPieceIndex, r.t.piece(firstPieceIndex).completion()))
}
+ r.t.iterPeers(func(c *Peer) {
+ c.updateRequests()
+ })
// Update the rest of the piece completions in the readahead window, without alerting to
// changes (since only the first piece, the one above, could have generated the read error
// we're currently handling).