Initialize bins when bins file is malformed
This commit is contained in:
@@ -32,6 +32,8 @@ func (t *TorrentManager) initializeBins() {
|
|||||||
err = json.Unmarshal(fileData, &data)
|
err = json.Unmarshal(fileData, &data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.repairLog.Errorf("Failed to unmarshal bin data: %v", err)
|
t.repairLog.Errorf("Failed to unmarshal bin data: %v", err)
|
||||||
|
t.ImmediateBin = mapset.NewSet[string]()
|
||||||
|
t.OnceDoneBin = mapset.NewSet[string]()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user