From af8cc0255ed8c0c54ffa1b927fc9243b96435c5b Mon Sep 17 00:00:00 2001 From: Denny Sheirer Date: Mon, 21 Mar 2022 19:09:49 -0400 Subject: [PATCH] #1186 removes error logging that indicates that a channel cannot be stopped because it doesn't exist. This happens when a second successive attempt to stop a channel fails to find the channel because the first attempt has already removed the channel from the list. (#1187) Co-authored-by: Denny Sheirer --- .../controller/channel/ChannelProcessingManager.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java b/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java index 77b23ec6..01327525 100644 --- a/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java +++ b/src/main/java/io/github/dsheirer/controller/channel/ChannelProcessingManager.java @@ -526,13 +526,13 @@ public class ChannelProcessingManager implements Listener */ private void stopProcessing(Channel channel) throws ChannelException { - //This has to be done on the FX event thread when the playlist editor is constructed - Platform.runLater(() -> channel.setProcessing(false)); - ProcessingChain processingChain = removeProcessingChain(channel); if(processingChain != null) { + //This has to be done on the FX event thread when the playlist editor is constructed + Platform.runLater(() -> channel.setProcessing(false)); + //Since the processing chain's source will block on stop(), throw it to the thread pool to run ThreadPool.CACHED.submit(() -> { try @@ -558,10 +558,6 @@ public class ChannelProcessingManager implements Listener } }); } - else - { - throw new ChannelException("Channel is not currently playing"); - } } /**