From 63aab06d3f1cf28042e667dc460f754151b3bc12 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 5 May 2019 15:43:18 +0700 Subject: [PATCH] shared HTTP Client instance for all thumbnail requests --- source/net/filebot/ThumbnailServices.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/ThumbnailServices.java b/source/net/filebot/ThumbnailServices.java index f08a3a3e..515f71f2 100644 --- a/source/net/filebot/ThumbnailServices.java +++ b/source/net/filebot/ThumbnailServices.java @@ -60,7 +60,6 @@ public enum ThumbnailServices implements ThumbnailProvider { // create if necessary CompletableFuture>[] request = new CompletableFuture[ids.length]; - Resource http = Resource.lazy(HttpClient::newHttpClient); for (int i = 0; i < response.length; i++) { if (response[i] == null && index.get().contains(ids[i])) { @@ -109,4 +108,7 @@ public enum ThumbnailServices implements ThumbnailProvider { return icons; } -} \ No newline at end of file + // shared HTTP Client instance for all thumbnail requests + private static final Resource http = Resource.lazy(HttpClient::newHttpClient); + +}