Initialize bins when bins file is malformed

This commit is contained in:
Ben Adrian Sarmiento
2024-06-11 22:35:32 +02:00
parent 59c15ebb0a
commit 92aaab875c

View File

@@ -32,6 +32,8 @@ func (t *TorrentManager) initializeBins() {
err = json.Unmarshal(fileData, &data)
if err != nil {
t.repairLog.Errorf("Failed to unmarshal bin data: %v", err)
t.ImmediateBin = mapset.NewSet[string]()
t.OnceDoneBin = mapset.NewSet[string]()
return
}