diff --git a/src/log4net/Repository/LoggerRepositorySkeleton.cs b/src/log4net/Repository/LoggerRepositorySkeleton.cs index 37d15968..3e24702c 100644 --- a/src/log4net/Repository/LoggerRepositorySkeleton.cs +++ b/src/log4net/Repository/LoggerRepositorySkeleton.cs @@ -453,11 +453,6 @@ protected virtual void OnConfigurationReset(EventArgs? e) /// Notify the registered listeners that the repository has had its configuration changed /// /// Empty EventArgs - /// - /// - /// Notify any listeners that this repository's configuration has changed. - /// - /// protected virtual void OnConfigurationChanged(EventArgs? e) => ConfigurationChanged?.Invoke(this, e ?? EventArgs.Empty); @@ -475,18 +470,14 @@ protected virtual void OnConfigurationChanged(EventArgs? e) private static int GetWaitTime(DateTime startTimeUtc, int millisecondsTimeout) { - if (millisecondsTimeout == Timeout.Infinite) - { - return Timeout.Infinite; - } - if (millisecondsTimeout == 0) + if (millisecondsTimeout is 0 or Timeout.Infinite) { - return 0; + return millisecondsTimeout; } int elapsedMilliseconds = (int)(DateTime.UtcNow - startTimeUtc).TotalMilliseconds; int timeout = millisecondsTimeout - elapsedMilliseconds; - return (timeout < 0) ? 0 : timeout; + return Math.Max(0, timeout); } ///