"strings"
"github.com/anacrolix/missinggo/pubsub"
+ "github.com/anacrolix/sync"
"github.com/anacrolix/torrent/metainfo"
)
// this. No data corruption can, or should occur to either the torrent's data,
// or connected peers.
func (t *Torrent) Drop() {
+ var wg sync.WaitGroup
+ defer wg.Wait()
t.cl.lock()
defer t.cl.unlock()
- t.cl.dropTorrent(t.infoHash)
+ t.cl.dropTorrent(t.infoHash, &wg)
}
// Number of bytes of the entire torrent we have completed. This is the sum of