]> Sergey Matveev's repositories - btrtrc.git/commitdiff
signal an event when torrent closed
authormlmhl <409107750@qq.com>
Sat, 3 Jun 2017 08:42:40 +0000 (16:42 +0800)
committerluffyma(马林) <luffyma@tencent.com>
Mon, 5 Jun 2017 00:46:50 +0000 (08:46 +0800)
torrent.go

index 6da9d46a704e24e6d28283d9955a7a817bb6a551..f60b3865f0c02b74c422783ba5f622f8f2fcfd8b 100644 (file)
@@ -553,6 +553,7 @@ func (t *Torrent) close() (err error) {
        for conn := range t.conns {
                conn.Close()
        }
+       t.cl.event.Broadcast()
        t.pieceStateChanges.Close()
        t.updateWantPeersEvent()
        return