Updates channel state to ensure teardown processing is completed during

a call end and/or during a commanded stop.
This commit is contained in:
Denny
2018-09-19 04:25:37 -04:00
parent 0f6044d48b
commit 28bc02e172
2 changed files with 7 additions and 15 deletions

View File

@@ -135,21 +135,8 @@ public class ChannelState extends Module implements ICallEventProvider, IDecoder
@Override @Override
public void stop() public void stop()
{ {
mMutableMetadata.resetAllAttributes(); processTeardownState();
mTrafficChannelEndListener = null;
if(mTrafficChannelCallEvent != null)
{
mTrafficChannelCallEvent.end();
broadcast(mTrafficChannelCallEvent);
}
mTrafficChannelCallEvent = null;
mSquelchLocked = false; mSquelchLocked = false;
setState(State.TEARDOWN);
} }
public void dispose() public void dispose()
@@ -420,9 +407,13 @@ public class ChannelState extends Module implements ICallEventProvider, IDecoder
mMutableMetadata.receive(new AttributeChangeRequest<State>(Attribute.CHANNEL_STATE, mState)); mMutableMetadata.receive(new AttributeChangeRequest<State>(Attribute.CHANNEL_STATE, mState));
if(mTrafficChannelEndListener != null) if(mTrafficChannelEndListener != null && mTrafficChannelCallEvent != null)
{ {
mTrafficChannelCallEvent.end();
broadcast(mTrafficChannelCallEvent);
mTrafficChannelEndListener.callEnd(mTrafficChannelCallEvent.getChannel()); mTrafficChannelEndListener.callEnd(mTrafficChannelCallEvent.getChannel());
mTrafficChannelEndListener = null;
mTrafficChannelCallEvent = null;
} }
} }

View File

@@ -300,6 +300,7 @@ public abstract class TunerChannelSource extends ComplexSource implements ISourc
mScheduledFuture = null; mScheduledFuture = null;
getHeartbeatManager().broadcast();
performDisposal(); performDisposal();
} }
} }