}
me.dataReady(dataSpec{t.InfoHash, req})
- // Cancel pending requests for this chunk.
- for _, c := range t.Conns {
- if me.connCancel(t, c, req) {
- me.replenishConnRequests(t, c)
- }
- }
-
// Record that we have the chunk.
delete(t.Pieces[req.Index].PendingChunkSpecs, req.chunkSpec)
if len(t.Pieces[req.Index].PendingChunkSpecs) == 0 {
}
}
+ // Cancel pending requests for this chunk.
+ for _, c := range t.Conns {
+ if me.connCancel(t, c, req) {
+ log.Print("cancelled concurrent request for %s", req)
+ me.replenishConnRequests(t, c)
+ }
+ }
+
return nil
}