torrent.go | 9 +++++++++ diff --git a/torrent.go b/torrent.go index da0c92bbe13d93bb454ea52315bb18ee4ee6114d..dd3a83cfabd78e0a281317d83e09a8ba2a0e0560 100644 --- a/torrent.go +++ b/torrent.go @@ -1066,6 +1066,9 @@ return } func (t *Torrent) needData() bool { + if t.closed.IsSet() { + return false + } if !t.haveInfo() { return true } @@ -1168,6 +1171,9 @@ // Returns whether the client should make effort to seed the torrent. func (t *Torrent) seeding() bool { cl := t.cl + if t.closed.IsSet() { + return false + } if cl.config.NoUpload { return false } @@ -1351,6 +1357,9 @@ return true } func (t *Torrent) wantConns() bool { + if t.closed.IsSet() { + return false + } if !t.seeding() && !t.needData() { return false }