config.go | 3 ++- torrent.go | 1 + diff --git a/config.go b/config.go index 1f2330005ad69fc3dac81b14484a5eded19585a2..d65019a17ec485634d9e7e83c55b527c8ffe74a6 100644 --- a/config.go +++ b/config.go @@ -35,7 +35,8 @@ DisableTCP bool `long:"disable-tcp"` // 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". diff --git a/torrent.go b/torrent.go index 53b5788f930c44b1b7966dde52ca9728afa17e60..589bff887ba6b9406cbe6e58e00295365e67e33f 100644 --- a/torrent.go +++ b/torrent.go @@ -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: