Move info chan closure

This commit is contained in:
Ben Sarmiento
2024-01-29 02:26:39 +01:00
parent 2a509f96ab
commit e69f57b930

View File

@@ -45,7 +45,6 @@ func (t *TorrentManager) refreshTorrents() []string {
}
wg.Wait()
close(infoChan)
t.log.Infof("Fetched info for %d torrents", len(instances))
// delete expired fixers
@@ -74,6 +73,7 @@ func (t *TorrentManager) refreshTorrents() []string {
}
t.log.Debugf("Delete once done left: %d", t.deleteOnceDone.Cardinality())
close(infoChan)
newlyFetchedKeys := mapset.NewSet[string]()
noInfoCount := 0
for info := range infoChan {