Immediate cleanup to prevent inconsistencies

This commit is contained in:
Ben Sarmiento
2024-05-28 03:51:01 +02:00
parent 2504b31d4c
commit 7470629486
5 changed files with 34 additions and 5 deletions

View File

@@ -79,6 +79,10 @@ func (t *TorrentManager) refreshTorrents() []string {
})
}
t.workerPool.Submit(func() {
t.cleanupBins(freshIDs)
})
wg.Wait()
close(mergeChan)
@@ -136,8 +140,6 @@ func (t *TorrentManager) refreshTorrents() []string {
}
return false
})
t.cleanupBins(freshIDs)
})
return updatedPaths.ToSlice()