Applies Jakub Adamek patch that adds NO_KEEP_ALIVES property which can be used to disable STUN keep alives.

This commit is contained in:
paweldomas 2013-09-18 07:20:33 +00:00
parent d61650957a
commit d304978b6d
2 changed files with 9 additions and 1 deletions

View File

@ -113,6 +113,12 @@ public class StackProperties
public static final String TERMINATION_DELAY
= "org.ice4j.TERMINATION_DELAY";
/**
* The name of the property that can be used to disable STUN keep alives.
* Set to <tt>true</tt> to disable.
*/
public static final String NO_KEEP_ALIVES = "org.ice4j.NO_KEEP_ALIVES";
/**
* THIS PROPERTY IS CURRENTLY UNUSED. IF YOU WANT TO SPEED UP NOMINATIONS
* THEN CONSIDER SPEEDING UP TRANSACTION FAILURE FOR THE TIME BEING.

View File

@ -1739,7 +1739,9 @@ public class Agent
setState(IceProcessingState.COMPLETED);
// keep ICE running (answer binding request)
if(stunKeepAliveThread == null)
if(stunKeepAliveThread == null
&& ! StackProperties.getBoolean(
StackProperties.NO_KEEP_ALIVES, false))
{
// schedule STUN checks for selected candidates
scheduleSTUNKeepAlive();