From 40410eba63a11509f58b46ded5ab9eae57f19395 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Fri, 21 Jun 2019 14:57:53 +0100 Subject: [PATCH] fix constructor --- .../main/groovy/com/muwire/core/download/Downloader.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 72959c4e..402138c5 100644 --- a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy +++ b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy @@ -228,6 +228,7 @@ public class Downloader { private volatile Thread downloadThread private Endpoint endpoint private volatile DownloadSession currentSession + private final Set available = new HashSet<>() DownloadWorker(Destination destination) { this.destination = destination @@ -248,7 +249,8 @@ public class Downloader { currentState = WorkerState.DOWNLOADING boolean requestPerformed while(!pieces.isComplete()) { - currentSession = new DownloadSession(eventBus, me.toBase64(), pieces, getInfoHash(), endpoint, incompleteFile, pieceSize, length) + currentSession = new DownloadSession(eventBus, me.toBase64(), pieces, getInfoHash(), + endpoint, incompleteFile, pieceSize, length, available) requestPerformed = currentSession.request() if (!requestPerformed) break