From c82fc54fbde4620bb6b366ea837b22a0d214e573 Mon Sep 17 00:00:00 2001 From: denny Date: Thu, 31 Dec 2015 09:40:20 -0500 Subject: [PATCH] Resolved issue with throwing a runtime exception when the state monitor was null. --- src/module/decode/state/ChannelState.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/module/decode/state/ChannelState.java b/src/module/decode/state/ChannelState.java index a3218dd8..3b538349 100644 --- a/src/module/decode/state/ChannelState.java +++ b/src/module/decode/state/ChannelState.java @@ -180,7 +180,7 @@ public class ChannelState extends Module implements ICallEventProvider, { if( mMonitoring.compareAndSet( false, true ) ) { - if( mRunningMonitor == null ) + if( mRunningMonitor == null && mStateMonitor != null ) { mRunningMonitor = mThreadPoolManager.scheduleFixedRate( ThreadType.DECODER, mStateMonitor, 20, TimeUnit.MILLISECONDS ); @@ -205,11 +205,6 @@ public class ChannelState extends Module implements ICallEventProvider, { mThreadPoolManager.cancel( mRunningMonitor ); } - else - { - throw new RuntimeException( "Channel state monitor's scheduled " - + "future pointer was null when trying to stop the monitor" ); - } mRunningMonitor = null; }