}
c.PeerPieces[piece] = true
}
- if t.wantPiece(piece) {
- c.updateRequests()
- }
+ c.updatePiecePriority(piece)
return nil
}
func (me *Client) dropConnection(t *torrent, c *connection) {
me.event.Broadcast()
c.Close()
+
if me.deleteConnection(t, c) {
me.openNewConns(t)
}
}
// TODO: Tidy this up?
t = newTorrent(spec.InfoHash)
+ t.cl = cl
if spec.ChunkSize != 0 {
t.chunkSize = pp.Integer(spec.ChunkSize)
}