diff --git a/AutoTx/AutoTx.cs b/AutoTx/AutoTx.cs index c4581c15f1a049b3024e51aeee27c59cd818258f..7afadb455da75d19e11d7b4bf7777a1fe7a8d9ca 100644 --- a/AutoTx/AutoTx.cs +++ b/AutoTx/AutoTx.cs @@ -438,8 +438,12 @@ namespace AutoTx // time by a factor of ten (to avoid triggering the same issue every second and // flooding the admins with emails): _mainTimer.Interval *= 10; + // make sure the interval doesn't exceed half a day: + const int maxInterval = 1000 * 60 * 60 * 12; + if (_mainTimer.Interval > maxInterval) + _mainTimer.Interval = maxInterval; Log.Error("Unhandled exception in OnTimedEvent(): {0}\n\n" + - "Trying exponential backoff, increasing timer interval to {1} ms.\n\n" + + "Trying exponential backoff, setting timer interval to {1} ms.\n\n" + "StackTrace: {2}", ex.Message, _mainTimer.Interval, ex.StackTrace); } finally { @@ -879,3 +883,4 @@ namespace AutoTx } } +