cmd/torrent/main.go | 2 +- diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index 221f6a0129d21275bbdc20c875a695d09465f84f..adc4f869bcf19bfda36d330139699ec228e722ef 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -270,6 +270,7 @@ http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { client.WriteStatus(w) }) addTorrents(client) + defer outputStats(client) if client.WaitAll() { log.Print("downloaded ALL the torrents") } else { @@ -279,7 +280,6 @@ if flags.Seed { outputStats(client) <-stop.C() } - outputStats(client) return nil }