t.go | 6 ++++++ diff --git a/t.go b/t.go index fcb57740f7287cc9367c7b329a47014e6be09a55..5abb91697ae661e47602c9d68288cb7edd62c8f7 100644 --- a/t.go +++ b/t.go @@ -74,3 +74,9 @@ func (t Torrent) SubscribePieceStateChanges() *pubsub.Subscription { return t.torrent.pieceStateChanges.Subscribe() } + +func (t Torrent) Seeding() bool { + t.cl.mu.Lock() + defer t.cl.mu.Unlock() + return t.cl.seeding(t.torrent) +}