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"); - } } /**