From 2886feab4a68becc68280442ce99225110a5cb75 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sun, 23 Jun 2019 17:08:07 +0100 Subject: [PATCH] do not modify the set of available pieces --- .../main/groovy/com/muwire/core/download/DownloadSession.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy b/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy index 71bb9f81..f6ee096d 100644 --- a/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy +++ b/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy @@ -75,7 +75,7 @@ class DownloadSession { if (available.isEmpty()) piece = pieces.claim() else - piece = pieces.claim(available) + piece = pieces.claim(new HashSet<>(available)) if (piece == -1) return false boolean unclaim = true