Rename connection.downloadedChunk -> receiveChunk

This commit is contained in:
Matt Joiner 2016-11-22 14:18:09 +11:00
parent 6f9bcff8b2
commit 84d243afca
1 changed files with 2 additions and 2 deletions

View File

@ -780,7 +780,7 @@ func (c *connection) mainReadLoop() error {
case pp.HaveNone:
err = c.peerSentHaveNone()
case pp.Piece:
c.downloadedChunk(&msg)
c.receiveChunk(&msg)
if len(msg.Piece) == int(t.chunkSize) {
t.chunkPool.Put(msg.Piece)
}
@ -928,7 +928,7 @@ func (cn *connection) rw() io.ReadWriter {
}
// Handle a received chunk from a peer.
func (c *connection) downloadedChunk(msg *pp.Message) {
func (c *connection) receiveChunk(msg *pp.Message) {
t := c.t
cl := t.cl
chunksReceived.Add(1)