Util: Reduce log level on SimpleTimer2 cancel failure

This commit is contained in:
zzz
2021-03-02 09:09:54 -05:00
parent d3563752a1
commit f04c0740c4

View File

@@ -397,10 +397,12 @@ public class SimpleTimer2 {
// The result (if rescheduled) is a dup on the queue, see tickets 1694, 1705
// Mitigated by close-to-execution check in reschedule()
boolean cancelled = _future.cancel(true);
if (cancelled)
if (cancelled) {
_state = TimedEventState.CANCELLED;
else
_log.error("could not cancel " + this + " to run in " + (_nextRun - System.currentTimeMillis()), new Exception());
} else {
if (_log.shouldWarn())
_log.warn("could not cancel " + this + " to run in " + (_nextRun - System.currentTimeMillis()), new Exception());
}
return cancelled;
}
return false;