From ac4af7763dd6060b7245350718c7ee86c3b6e523 Mon Sep 17 00:00:00 2001 From: "Y.Tory" <5343692+kagemomiji@users.noreply.github.com> Date: Tue, 30 Apr 2024 01:37:13 +0000 Subject: [PATCH] Shutdown thread pool after stopping media scanning and indexing --- .../org/airsonic/player/service/MediaScannerService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/MediaScannerService.java b/airsonic-main/src/main/java/org/airsonic/player/service/MediaScannerService.java index d8f6a6e88..cd7f53077 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/MediaScannerService.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/MediaScannerService.java @@ -230,12 +230,11 @@ public synchronized void scanLibrary() { setMediaScanning(false); }) .thenRunAsync(() -> playlistFileService.importPlaylists(), pool) - .whenComplete((r,e) -> { - pool.shutdown(); - }) .whenComplete((r,e) -> { indexManager.stopIndexing(statistics); + LOG.info("Indexing complete."); setScanning(false); + pool.shutdown(); }); }