t.go | 7 ++++--- diff --git a/t.go b/t.go index 5fa9f3ddc22921e1b5ba1352b4040d16f719cf6a..2c076386b0856899d44fa657b74d2c92c51c4b14 100644 --- a/t.go +++ b/t.go @@ -124,10 +124,11 @@ } // Returns true if the torrent is currently being seeded. This occurs when the // client is willing to upload without wanting anything in return. -func (t *Torrent) Seeding() bool { +func (t *Torrent) Seeding() (ret bool) { t.cl.lock() - defer t.cl.unlock() - return t.seeding() + ret = t.seeding() + t.cl.unlock() + return } // Clobbers the torrent display name if metainfo is unavailable.