From 421da1c1ce04d3c284b85e2b8526fe56f199e6cf Mon Sep 17 00:00:00 2001 From: Denny Sheirer Date: Sun, 5 Mar 2023 06:34:29 -0500 Subject: [PATCH] Cherry Pick: #1405 polyphase channelizer thread leak. --- .../dsp/filter/channelizer/PolyphaseChannelSource.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/dsheirer/dsp/filter/channelizer/PolyphaseChannelSource.java b/src/main/java/io/github/dsheirer/dsp/filter/channelizer/PolyphaseChannelSource.java index 70a82569..f6796d5e 100644 --- a/src/main/java/io/github/dsheirer/dsp/filter/channelizer/PolyphaseChannelSource.java +++ b/src/main/java/io/github/dsheirer/dsp/filter/channelizer/PolyphaseChannelSource.java @@ -28,11 +28,12 @@ import io.github.dsheirer.source.SourceEvent; import io.github.dsheirer.source.tuner.channel.StreamProcessorWithHeartbeat; import io.github.dsheirer.source.tuner.channel.TunerChannel; import io.github.dsheirer.source.tuner.channel.TunerChannelSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.ArrayList; import java.util.List; import java.util.concurrent.locks.ReentrantLock; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Polyphase Channelizer's Tuner Channel Source implementation. Wraps a ChannelOutputProcessor instance and @@ -201,6 +202,7 @@ public class PolyphaseChannelSource extends TunerChannelSource implements Listen if(mPolyphaseChannelOutputProcessor != null) { mPolyphaseChannelOutputProcessor.setListener(null); + mPolyphaseChannelOutputProcessor.stop(); } mPolyphaseChannelOutputProcessor = null;