From 73208b97ca5f71095515a53530f8e5982b5ea62e Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 17 Feb 2016 17:09:43 +1100 Subject: [PATCH] Code comments --- config.go | 3 ++- torrent.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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: -- 2.48.1