cmd/torrent: Output stats on termination, not just completion

This commit is contained in:
Matt Joiner 2020-05-03 18:42:37 +10:00
parent 90bbdf9adb
commit 11e13ac8c1
1 changed files with 1 additions and 1 deletions

View File

@ -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
} }