cmd/torrent: Output stats on termination, not just completion
This commit is contained in:
parent
90bbdf9adb
commit
11e13ac8c1
|
@ -270,6 +270,7 @@ func downloadErr(args []string, parent *tagflag.Parser) error {
|
||||||
client.WriteStatus(w)
|
client.WriteStatus(w)
|
||||||
})
|
})
|
||||||
addTorrents(client)
|
addTorrents(client)
|
||||||
|
defer outputStats(client)
|
||||||
if client.WaitAll() {
|
if client.WaitAll() {
|
||||||
log.Print("downloaded ALL the torrents")
|
log.Print("downloaded ALL the torrents")
|
||||||
} else {
|
} else {
|
||||||
|
@ -279,7 +280,6 @@ func downloadErr(args []string, parent *tagflag.Parser) error {
|
||||||
outputStats(client)
|
outputStats(client)
|
||||||
<-stop.C()
|
<-stop.C()
|
||||||
}
|
}
|
||||||
outputStats(client)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue