Adds a "reachable" flag to the ConnectivityCheck*.java for debugging purposes.
This commit is contained in:
parent
23d3b809cb
commit
b564f06732
@ -1725,6 +1725,17 @@ public class Agent
|
|||||||
if(!atLeastOneListSucceeded)
|
if(!atLeastOneListSucceeded)
|
||||||
{
|
{
|
||||||
//all lists ended but none succeeded. No love today ;(
|
//all lists ended but none succeeded. No love today ;(
|
||||||
|
if (logger.isLoggable(Level.INFO)) {
|
||||||
|
if (connCheckClient.isReachable()
|
||||||
|
|| connCheckServer.isReachable())
|
||||||
|
{
|
||||||
|
logger.info("Suspicious ICE connectivity failure. Checks" +
|
||||||
|
" failed but the remote end was able to reach us.");
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("ICE state is FAILED");
|
||||||
|
}
|
||||||
|
|
||||||
terminate(IceProcessingState.FAILED);
|
terminate(IceProcessingState.FAILED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,6 +54,22 @@ class ConnectivityCheckClient
|
|||||||
*/
|
*/
|
||||||
private Map<String, Timer> timers = new HashMap<String, Timer>();
|
private Map<String, Timer> timers = new HashMap<String, Timer>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A flag that determines whether we have received a STUN response or not.
|
||||||
|
*/
|
||||||
|
private boolean reachable = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a boolean value indicating whether we have received a STUN
|
||||||
|
* response or not.
|
||||||
|
*
|
||||||
|
* @return a boolean value indicating whether we have received a STUN
|
||||||
|
* response or not.
|
||||||
|
*/
|
||||||
|
public boolean isReachable() {
|
||||||
|
return reachable;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new <tt>ConnectivityCheckHandler</tt> setting
|
* Creates a new <tt>ConnectivityCheckHandler</tt> setting
|
||||||
* <tt>parentAgent</tt> as the agent that will be used for retrieving
|
* <tt>parentAgent</tt> as the agent that will be used for retrieving
|
||||||
@ -321,6 +337,8 @@ class ConnectivityCheckClient
|
|||||||
*/
|
*/
|
||||||
public void processResponse(StunResponseEvent ev)
|
public void processResponse(StunResponseEvent ev)
|
||||||
{
|
{
|
||||||
|
reachable = true;
|
||||||
|
|
||||||
CandidatePair checkedPair
|
CandidatePair checkedPair
|
||||||
= (CandidatePair) ev.getTransactionID().getApplicationData();
|
= (CandidatePair) ev.getTransactionID().getApplicationData();
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,22 @@ class ConnectivityCheckServer
|
|||||||
*/
|
*/
|
||||||
private final StunStack stunStack;
|
private final StunStack stunStack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A flag that determines whether we have received a STUN request or not.
|
||||||
|
*/
|
||||||
|
private boolean reachable = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a boolean value indicating whether we have received a STUN
|
||||||
|
* request or not.
|
||||||
|
*
|
||||||
|
* @return a boolean value indicating whether we have received a STUN
|
||||||
|
* request or not.
|
||||||
|
*/
|
||||||
|
public boolean isReachable() {
|
||||||
|
return reachable;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new <tt>ConnectivityCheckServer</tt> setting
|
* Creates a new <tt>ConnectivityCheckServer</tt> setting
|
||||||
* <tt>parentAgent</tt> as the agent that will be used for retrieving
|
* <tt>parentAgent</tt> as the agent that will be used for retrieving
|
||||||
@ -82,6 +98,8 @@ class ConnectivityCheckServer
|
|||||||
if(logger.isLoggable(Level.FINER))
|
if(logger.isLoggable(Level.FINER))
|
||||||
logger.finer("Received request " + evt);
|
logger.finer("Received request " + evt);
|
||||||
|
|
||||||
|
reachable = true;
|
||||||
|
|
||||||
Request request = (Request)evt.getMessage();
|
Request request = (Request)evt.getMessage();
|
||||||
|
|
||||||
//ignore incoming requests that are not meant for the local user.
|
//ignore incoming requests that are not meant for the local user.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user