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)
|
||||
})
|
||||
addTorrents(client)
|
||||
defer outputStats(client)
|
||||
if client.WaitAll() {
|
||||
log.Print("downloaded ALL the torrents")
|
||||
} else {
|
||||
|
@ -279,7 +280,6 @@ func downloadErr(args []string, parent *tagflag.Parser) error {
|
|||
outputStats(client)
|
||||
<-stop.C()
|
||||
}
|
||||
outputStats(client)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue