]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Code comments
authorMatt Joiner <anacrolix@gmail.com>
Wed, 17 Feb 2016 06:09:43 +0000 (17:09 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 17 Feb 2016 06:09:43 +0000 (17:09 +1100)
config.go
torrent.go

index 1f2330005ad69fc3dac81b14484a5eded19585a2..d65019a17ec485634d9e7e83c55b527c8ffe74a6 100644 (file)
--- a/config.go
+++ b/config.go
@@ -35,7 +35,8 @@ type Config struct {
        // Don't automatically load "$ConfigDir/blocklist".
        NoDefaultBlocklist bool
        // Defaults to "$HOME/.config/torrent". This is where "blocklist",
-       // "torrents" and other operational files are stored.
+       // "torrents" and other operational files are stored. TODO: Dump this
+       // stuff, this is specific to the default cmd/torrent client only.
        ConfigDir string
        // Don't save or load to a cache of torrent files stored in
        // "$ConfigDir/torrents".
index 53b5788f930c44b1b7966dde52ca9728afa17e60..589bff887ba6b9406cbe6e58e00295365e67e33f 100644 (file)
@@ -551,6 +551,7 @@ func (t *torrent) numPiecesCompleted() (num int) {
        return t.completedPieces.Len()
 }
 
+// Safe to call with or without client lock.
 func (t *torrent) isClosed() bool {
        select {
        case <-t.closing: