Skip to content

Commit

Permalink
Fix consent checks (#272)
Browse files Browse the repository at this point in the history
* fix: Fix sending consent checks (wrong property name).

* log: Log exceptions from PeriodicRunnable.
  • Loading branch information
bgrozev authored Oct 2, 2023
1 parent 27ad37d commit fd43e6c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 0 additions & 10 deletions src/main/java/org/ice4j/ice/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.ice4j.ice.harvest.*;
import org.ice4j.stack.*;
import org.ice4j.util.PeriodicRunnable;
import org.jitsi.utils.collections.*;
import org.jitsi.utils.concurrent.*;
import org.jitsi.utils.logging2.Logger;
import org.jitsi.utils.logging2.*;
Expand Down Expand Up @@ -70,15 +69,6 @@ public class Agent
private static final PropertyChangeListener[] NO_STATE_CHANGE_LISTENERS
= new PropertyChangeListener[0];

/**
* The {@link Logger} used by the {@link Agent} class for logging output.
* Note that this shouldn't be used directly by instances of {@link Agent},
* because it doesn't take into account the per-instance log level.
* Instances should use {@link #logger} instead.
*/
private static final java.util.logging.Logger classLogger
= java.util.logging.Logger.getLogger(Agent.class.getName());

/**
* The name of the {@link PropertyChangeEvent} that we use to deliver
* events on changes in the state of ICE processing in this agent.
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/ice4j/util/PeriodicRunnable.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.ice4j.util;

import org.jitsi.utils.logging2.*;

import java.time.*;
import java.util.concurrent.*;

Expand All @@ -11,6 +13,11 @@
*/
public abstract class PeriodicRunnable
{
/**
* The {@link Logger} used by the {@link PeriodicRunnable} class for logging output.
*/
private final static Logger logger = new LoggerImpl(PeriodicRunnable.class.getName());

/**
* A timer to perform periodic scheduling of {@link #run()} execution
* on {@link #executor}'s thread.
Expand Down Expand Up @@ -205,6 +212,10 @@ private void executeRun()
{
this.run();
}
catch (Exception e)
{
logger.warn("Exception in run(), will retry.", e);
}
finally
{
if (running)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/ice4j/ice/AgentConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AgentConfig {
}

val randomizeConsentFreshnessInterval: Boolean by config {
"ice4j.consent-freshness.randomize".from(configSource)
"ice4j.consent-freshness.randomize-interval".from(configSource)
}

val consentFreshnessOriginalWaitInterval: Duration by config {
Expand Down

0 comments on commit fd43e6c

Please sign in to comment.