diff --git a/src/org/ice4j/ice/ConnectivityCheckClient.java b/src/org/ice4j/ice/ConnectivityCheckClient.java
index d9365e5..bf087f2 100644
--- a/src/org/ice4j/ice/ConnectivityCheckClient.java
+++ b/src/org/ice4j/ice/ConnectivityCheckClient.java
@@ -253,6 +253,8 @@ class ConnectivityCheckClient
tran.setApplicationData(candidatePair);
+ if (isReliableTransport(candidatePair))
+ maxRetransmissions = 0;
logger.fine(
"start check for " + candidatePair.toShortString() + " tid "
+ tran);
@@ -707,6 +709,20 @@ class ConnectivityCheckClient
evt.getRemoteAddress());
}
+ /**
+ * Checks whether the transport protocol used by pair is to be
+ * considered reliable for the purposes of ConnectivityCheckClient,
+ * that is, if client transactions need to be retransmitted or not.
+ * @param pair the pair to check.
+ * @return true iff the transport protocol of pair is
+ * to be considered reliable and retransmissions should be disabled for
+ * a client transaction for pair.
+ */
+ private boolean isReliableTransport(CandidatePair pair)
+ {
+ return pair.getLocalCandidate().getTransport() == Transport.TCP;
+ }
+
/**
* In case of a role conflict, changes the state of the agent and
* reschedules the check, in all other cases sets the corresponding peer