Treat the TERMINATED state the same as COMPLETED when handling binding

responses.
This commit is contained in:
boris 2015-03-13 13:38:38 +00:00
parent 89fd7625fe
commit cd826a1233
3 changed files with 16 additions and 3 deletions

View File

@ -1696,7 +1696,7 @@ public class Agent
boolean allListsEnded = true;
boolean atLeastOneListSucceeded = false;
if(getState() == IceProcessingState.COMPLETED)
if(getState().isEstablished())
return;
List<IceMediaStream> streams = getStreams();

View File

@ -373,8 +373,7 @@ class ConnectivityCheckClient
= checkedPair.getParentComponent().getParentStream();
final CheckList checkList = stream.getCheckList();
if(stream.getParentAgent().getState().equals(
IceProcessingState.COMPLETED))
if(stream.getParentAgent().getState().isEstablished())
return;
//If all of the pairs in the check list are now either in the Failed or

View File

@ -87,4 +87,18 @@ public enum IceProcessingState
{
return stateName;
}
/**
* Returns <tt>true</tt> iff the state is one in which a connection
* has been established, that is either <tt>COMPLETED</tt> or
* <tt>TERMINATED</tt>.
*
* @return <tt>true</tt> iff the state is one in which a connection
* has been established, that is either <tt>COMPLETED</tt> or
* <tt>TERMINATED</tt>.
*/
public boolean isEstablished()
{
return this == COMPLETED || this == TERMINATED;
}
}