summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Skryabin <a.skryabin@vk.team>2022-05-23 12:06:05 +0300
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2022-05-26 14:53:08 +0000
commitaf9546db507d3354508cf061398b6a5b363f11ab (patch)
treebe9273b38fffc5902e0fc0ca7f4d4c3ee724880b
parentbe870e75f35507a7089121c61441be7e561dc820 (diff)
downloadlibnice-af9546db507d3354508cf061398b6a5b363f11ab.tar.gz
Conncheck: always updating remote_consent.last_received for selected pair on keepalive
-rw-r--r--agent/conncheck.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 7b441da..75e80e7 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -4329,12 +4329,13 @@ static gboolean priv_map_reply_to_relay_remove (NiceAgent *agent,
static gboolean priv_map_reply_to_keepalive_conncheck (NiceAgent *agent,
NiceComponent *component, StunMessage *resp)
{
+ guint64 now = g_get_monotonic_time();
+
nice_debug ("Agent %p : Keepalive for selected pair %p received.",
agent, &component->selected_pair);
- if (agent->consent_freshness) {
- guint64 now = g_get_monotonic_time();
- component->selected_pair.remote_consent.last_received = now;
- }
+
+ /* timeout is checked even if consent_freshness is disabled */
+ component->selected_pair.remote_consent.last_received = now;
return TRUE;
}