From: Matt Joiner Date: Wed, 17 Feb 2016 06:09:43 +0000 (+1100) Subject: Code comments X-Git-Tag: v1.0.0~887 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=73208b97ca5f71095515a53530f8e5982b5ea62e;p=btrtrc.git Code comments --- diff --git a/config.go b/config.go index 1f233000..d65019a1 100644 --- 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". diff --git a/torrent.go b/torrent.go index 53b5788f..589bff88 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: