From 72e22e241fe80a377348cf7d2c101e08c9a9d3a1 Mon Sep 17 00:00:00 2001 From: Nils Schnabel Date: Thu, 28 Dec 2023 11:07:31 +0100 Subject: [PATCH] [PJLink] forget threadpool after it was shutdown (#16119) This is an issue if the user cancels/restarts discovery scans, new tasks were added to the shutdown threadpool. With this PR, a new threadpool will be created on the next scan in getExecutorService(). Signed-off-by: Nils Schnabel --- .../internal/discovery/AbstractDiscoveryParticipant.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/discovery/AbstractDiscoveryParticipant.java b/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/discovery/AbstractDiscoveryParticipant.java index 1e9effbdc..2d9f09e83 100644 --- a/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/discovery/AbstractDiscoveryParticipant.java +++ b/bundles/org.openhab.binding.pjlinkdevice/src/main/java/org/openhab/binding/pjlinkdevice/internal/discovery/AbstractDiscoveryParticipant.java @@ -97,6 +97,7 @@ public abstract class AbstractDiscoveryParticipant extends AbstractDiscoveryServ Thread.currentThread().interrupt(); // Reset interrupt flag } executorService.shutdown(); + this.executorService = null; } public static ThingUID createServiceUID(String ip, int tcpPort) {