]> Sergey Matveev's repositories - btrtrc.git/blobdiff - client.go
Merge a bunch of stuff into ConnStats and refactor connection.upload
[btrtrc.git] / client.go
index 54a8b6ef7c9e009df2f54824faa5e40b169093ea..efe5f736776a5a5733ed381106f9412108f7ac47 100644 (file)
--- a/client.go
+++ b/client.go
@@ -950,7 +950,7 @@ func (cl *Client) gotMetadataExtensionMsg(payload []byte, t *Torrent, c *connect
                        return fmt.Errorf("data has bad offset in payload: %d", begin)
                }
                t.saveMetadataPiece(piece, payload[begin:])
-               c.UsefulChunksReceived++
+               c.stats.ChunksReadUseful++
                c.lastUsefulChunkReceived = time.Now()
                return t.maybeCompleteMetadata()
        case pp.RequestMetadataExtensionMsgType: