diff --git a/src/main/java/org/ice4j/ice/Agent.java b/src/main/java/org/ice4j/ice/Agent.java index 19738057..9ceeab23 100644 --- a/src/main/java/org/ice4j/ice/Agent.java +++ b/src/main/java/org/ice4j/ice/Agent.java @@ -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.*; @@ -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. diff --git a/src/main/java/org/ice4j/util/PeriodicRunnable.java b/src/main/java/org/ice4j/util/PeriodicRunnable.java index 73e28fdf..b3c48c18 100644 --- a/src/main/java/org/ice4j/util/PeriodicRunnable.java +++ b/src/main/java/org/ice4j/util/PeriodicRunnable.java @@ -1,5 +1,7 @@ package org.ice4j.util; +import org.jitsi.utils.logging2.*; + import java.time.*; import java.util.concurrent.*; @@ -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. @@ -205,6 +212,10 @@ private void executeRun() { this.run(); } + catch (Exception e) + { + logger.warn("Exception in run(), will retry.", e); + } finally { if (running) diff --git a/src/main/kotlin/org/ice4j/ice/AgentConfig.kt b/src/main/kotlin/org/ice4j/ice/AgentConfig.kt index 5eeb05d2..bb2e835e 100644 --- a/src/main/kotlin/org/ice4j/ice/AgentConfig.kt +++ b/src/main/kotlin/org/ice4j/ice/AgentConfig.kt @@ -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 {