]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Triage announcer leak on dropped torrents
authorMatt Joiner <anacrolix@gmail.com>
Thu, 24 Jul 2014 03:46:14 +0000 (13:46 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 24 Jul 2014 03:46:14 +0000 (13:46 +1000)
client.go

index 9fe3f39dcdce81f0480278037d0394d994f568af..23ebe86b7607bfef432a5c09f61ae84aa0f322c2 100644 (file)
--- a/client.go
+++ b/client.go
@@ -1008,6 +1008,9 @@ func (cl *Client) announceTorrent(t *torrent) {
 newAnnounce:
        for {
                cl.mu.Lock()
+               if t.isClosed() {
+                       return
+               }
                req.Left = t.BytesLeft()
                cl.mu.Unlock()
                for _, tier := range t.Trackers {