summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-07-09 15:22:01 +0200
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2018-10-21 08:22:36 +0000
commitad884734db2b8ef19b4b42411372ddca2a916c9d (patch)
tree4ed843f911248eb9da21f12defe3a418f120032e
parentb257672b46b00fb5a6a5984ead069e60e5b3d00c (diff)
downloadlibnice-ad884734db2b8ef19b4b42411372ddca2a916c9d.tar.gz
conncheck: don't disable keepalive on TCP if it's explicitly enabled
This makes it possible to enable keepalive for TCP candidates. It is useful to detect disappearing peers or network failures faster.
-rw-r--r--agent/conncheck.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 64a3cb8..d267429 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1340,8 +1340,9 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
if (component->selected_pair.local != NULL) {
CandidatePair *p = &component->selected_pair;
- /* Disable keepalive checks on TCP candidates */
- if (p->local->transport != NICE_CANDIDATE_TRANSPORT_UDP)
+ /* Disable keepalive checks on TCP candidates unless explicitly enabled */
+ if (p->local->transport != NICE_CANDIDATE_TRANSPORT_UDP &&
+ !agent->keepalive_conncheck)
continue;
if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE ||