mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 01:27:34 -05:00
Resolved issue with throwing a runtime exception when the state monitor
was null.
This commit is contained in:
@@ -180,7 +180,7 @@ public class ChannelState extends Module implements ICallEventProvider,
|
|||||||
{
|
{
|
||||||
if( mMonitoring.compareAndSet( false, true ) )
|
if( mMonitoring.compareAndSet( false, true ) )
|
||||||
{
|
{
|
||||||
if( mRunningMonitor == null )
|
if( mRunningMonitor == null && mStateMonitor != null )
|
||||||
{
|
{
|
||||||
mRunningMonitor = mThreadPoolManager.scheduleFixedRate(
|
mRunningMonitor = mThreadPoolManager.scheduleFixedRate(
|
||||||
ThreadType.DECODER, mStateMonitor, 20, TimeUnit.MILLISECONDS );
|
ThreadType.DECODER, mStateMonitor, 20, TimeUnit.MILLISECONDS );
|
||||||
@@ -205,11 +205,6 @@ public class ChannelState extends Module implements ICallEventProvider,
|
|||||||
{
|
{
|
||||||
mThreadPoolManager.cancel( mRunningMonitor );
|
mThreadPoolManager.cancel( mRunningMonitor );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new RuntimeException( "Channel state monitor's scheduled "
|
|
||||||
+ "future pointer was null when trying to stop the monitor" );
|
|
||||||
}
|
|
||||||
|
|
||||||
mRunningMonitor = null;
|
mRunningMonitor = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user