}
}
-func txStatsDumper(c *torrent.Client, cancel chan struct{}) {
+func txStatsDumper(c *torrent.Client) {
tick := time.Tick(10 * time.Second)
for {
txStatsDumpAll(c)
select {
- case <-cancel:
- close(cancel)
+ case <-Cancel:
+ Jobs.Done()
return
case <-tick:
}