diff --git a/src/org/ice4j/ice/Agent.java b/src/org/ice4j/ice/Agent.java index 587770c..afde2bb 100644 --- a/src/org/ice4j/ice/Agent.java +++ b/src/org/ice4j/ice/Agent.java @@ -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."); diff --git a/src/org/ice4j/ice/ConnectivityCheckClient.java b/src/org/ice4j/ice/ConnectivityCheckClient.java index 5b4e413..eca8541 100644 --- a/src/org/ice4j/ice/ConnectivityCheckClient.java +++ b/src/org/ice4j/ice/ConnectivityCheckClient.java @@ -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(); diff --git a/src/org/ice4j/ice/ConnectivityCheckServer.java b/src/org/ice4j/ice/ConnectivityCheckServer.java index 460ac67..14bac98 100644 --- a/src/org/ice4j/ice/ConnectivityCheckServer.java +++ b/src/org/ice4j/ice/ConnectivityCheckServer.java @@ -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();