summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Skryabin <a.skryabin@vk.team>2022-05-20 18:53:50 +0300
committerAndrey Skryabin <a.skryabin@vk.team>2022-05-20 18:53:50 +0300
commit8fde444ffc359ed9824cb9ae1ece055d823c77fb (patch)
treef78575be5a7ee60e4f95c6174e274b083e3e2c4e
parentff9ee9912fafab3bb0dd069f7407ea20001c264c (diff)
downloadlibnice-8fde444ffc359ed9824cb9ae1ece055d823c77fb.tar.gz
Conncheck: recheck consent timeout overflow fix
-rw-r--r--agent/conncheck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 49869a3..7b441da 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1281,7 +1281,7 @@ static gboolean priv_conn_remote_consent_tick_agent_locked (
agent_signal_component_state_change (agent, pair->keepalive.stream_id,
pair->keepalive.component_id, NICE_COMPONENT_STATE_FAILED);
} else {
- guint64 delay = (consent_timeout - now - pair->remote_consent.last_received) / 1000;
+ guint64 delay = (consent_timeout - (now - pair->remote_consent.last_received)) / 1000;
nice_debug ("Agent %p : pair %p rechecking consent in %" G_GUINT64_FORMAT ".%03" G_GUINT64_FORMAT "s",
agent, pair, delay / 1000, delay % 1000);
agent_timeout_add_with_context (agent,