mirror of https://github.com/zlatinb/muwire
assume all persisted sources were successful
parent
6f6d6f5065
commit
5bddfc10e9
|
@ -172,6 +172,8 @@ public class DownloadManager {
|
||||||
if (json.paused != null)
|
if (json.paused != null)
|
||||||
downloader.paused = json.paused
|
downloader.paused = json.paused
|
||||||
|
|
||||||
|
downloader.successfulDestinations.addAll(destinations) // if it was persisted, it was successful
|
||||||
|
|
||||||
try {
|
try {
|
||||||
downloader.readPieces()
|
downloader.readPieces()
|
||||||
if (!downloader.paused)
|
if (!downloader.paused)
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class Downloader {
|
||||||
private final File incompleteFile
|
private final File incompleteFile
|
||||||
final int pieceSizePow2
|
final int pieceSizePow2
|
||||||
private final Map<Destination, DownloadWorker> activeWorkers = new ConcurrentHashMap<>()
|
private final Map<Destination, DownloadWorker> activeWorkers = new ConcurrentHashMap<>()
|
||||||
private final Set<Destination> successfulDestinations = new ConcurrentHashSet<>()
|
final Set<Destination> successfulDestinations = new ConcurrentHashSet<>()
|
||||||
/** LOCKING: itself */
|
/** LOCKING: itself */
|
||||||
private final Map<Destination, Integer> failingDestinations = new HashMap<>()
|
private final Map<Destination, Integer> failingDestinations = new HashMap<>()
|
||||||
private final int maxFailures
|
private final int maxFailures
|
||||||
|
|
Loading…
Reference in New Issue