Renames the "reachable" flag to "alive" and adds additional comments explaining its purpose and usage.
This commit is contained in:
parent
b564f06732
commit
03c5f7c162
@ -1726,8 +1726,8 @@ public class Agent
|
||||
{
|
||||
//all lists ended but none succeeded. No love today ;(
|
||||
if (logger.isLoggable(Level.INFO)) {
|
||||
if (connCheckClient.isReachable()
|
||||
|| connCheckServer.isReachable())
|
||||
if (connCheckClient.isAlive()
|
||||
|| connCheckServer.isAlive())
|
||||
{
|
||||
logger.info("Suspicious ICE connectivity failure. Checks" +
|
||||
" failed but the remote end was able to reach us.");
|
||||
|
||||
@ -57,17 +57,23 @@ class ConnectivityCheckClient
|
||||
/**
|
||||
* A flag that determines whether we have received a STUN response or not.
|
||||
*/
|
||||
private boolean reachable = false;
|
||||
private boolean alive = false;
|
||||
|
||||
/**
|
||||
* Returns a boolean value indicating whether we have received a STUN
|
||||
* response or not.
|
||||
*
|
||||
* Note that this should NOT be taken as an indication that the negotiation
|
||||
* has succeeded, it merely indicates that we have received ANY STUN
|
||||
* response, possibly a BINDING_ERROR_RESPONSE. It is completely
|
||||
* unrelated/independent from the ICE spec and it's only meant to be used
|
||||
* for debugging purposes.
|
||||
*
|
||||
* @return a boolean value indicating whether we have received a STUN
|
||||
* response or not.
|
||||
*/
|
||||
public boolean isReachable() {
|
||||
return reachable;
|
||||
public boolean isAlive() {
|
||||
return alive;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -337,7 +343,7 @@ class ConnectivityCheckClient
|
||||
*/
|
||||
public void processResponse(StunResponseEvent ev)
|
||||
{
|
||||
reachable = true;
|
||||
alive = true;
|
||||
|
||||
CandidatePair checkedPair
|
||||
= (CandidatePair) ev.getTransactionID().getApplicationData();
|
||||
|
||||
@ -51,17 +51,23 @@ class ConnectivityCheckServer
|
||||
/**
|
||||
* A flag that determines whether we have received a STUN request or not.
|
||||
*/
|
||||
private boolean reachable = false;
|
||||
private boolean alive = false;
|
||||
|
||||
/**
|
||||
* Returns a boolean value indicating whether we have received a STUN
|
||||
* request or not.
|
||||
*
|
||||
* Note that this should NOT be taken as an indication that the negotiation
|
||||
* has succeeded, it merely indicates that we have received ANY STUN
|
||||
* request, even invalid ones (e.g. with the wrong username or ufrag). It is
|
||||
* completely unrelated/independent from the ICE spec and it's only meant to
|
||||
* be used for debugging purposes.
|
||||
*
|
||||
* @return a boolean value indicating whether we have received a STUN
|
||||
* request or not.
|
||||
*/
|
||||
public boolean isReachable() {
|
||||
return reachable;
|
||||
public boolean isAlive() {
|
||||
return alive;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,7 +104,7 @@ class ConnectivityCheckServer
|
||||
if(logger.isLoggable(Level.FINER))
|
||||
logger.finer("Received request " + evt);
|
||||
|
||||
reachable = true;
|
||||
alive = true;
|
||||
|
||||
Request request = (Request)evt.getMessage();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user