diff --git a/core/src/main/groovy/com/muwire/core/download/DownloadManager.groovy b/core/src/main/groovy/com/muwire/core/download/DownloadManager.groovy index 8180197b..c928caa5 100644 --- a/core/src/main/groovy/com/muwire/core/download/DownloadManager.groovy +++ b/core/src/main/groovy/com/muwire/core/download/DownloadManager.groovy @@ -172,6 +172,8 @@ public class DownloadManager { if (json.paused != null) downloader.paused = json.paused + downloader.successfulDestinations.addAll(destinations) // if it was persisted, it was successful + try { downloader.readPieces() if (!downloader.paused) diff --git a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy index 16246f17..ef423c7f 100644 --- a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy +++ b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy @@ -59,7 +59,7 @@ public class Downloader { private final File incompleteFile final int pieceSizePow2 private final Map activeWorkers = new ConcurrentHashMap<>() - private final Set successfulDestinations = new ConcurrentHashSet<>() + final Set successfulDestinations = new ConcurrentHashSet<>() /** LOCKING: itself */ private final Map failingDestinations = new HashMap<>() private final int maxFailures