Clone set before modifying

This commit is contained in:
Ben Sarmiento
2024-05-27 17:17:45 +02:00
parent f28255a142
commit 964fdfcbf9
5 changed files with 25 additions and 14 deletions

View File

@@ -124,7 +124,7 @@ func (t *TorrentManager) binOnceDone(torrentId string) bool {
}
hasError := false
t.OnceDoneBin.Each(func(entry string) bool {
t.OnceDoneBin.Clone().Each(func(entry string) bool {
if strings.Contains(entry, specialCase) {
idToDelete := strings.Split(entry, "-")[1]
if err := t.api.DeleteTorrent(idToDelete); err != nil {