Do not retransmit connection checks on reliable transport
authorJakub Adam <jakub.adam@ktknet.cz>
Thu, 2 Jun 2011 21:04:44 +0000 (23:04 +0200)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Thu, 15 May 2014 13:43:15 +0000 (09:43 -0400)
agent/conncheck.c

index c2c95c4..6651b0a 100644 (file)
@@ -1739,8 +1739,12 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
     }
 
     if (buffer_len > 0) {
-      stun_timer_start (&pair->timer, STUN_TIMER_DEFAULT_TIMEOUT,
-          STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
+      if (nice_socket_is_reliable(pair->local->sockptr)) {
+        stun_timer_start_reliable(&pair->timer, STUN_TIMER_DEFAULT_TIMEOUT);
+      } else {
+        stun_timer_start (&pair->timer, STUN_TIMER_DEFAULT_TIMEOUT,
+            STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
+      }
 
       /* send the conncheck */
       agent_socket_send (pair->local->sockptr, &pair->remote->addr,