diff --git a/src/Foundatio/Queues/InMemoryQueue.cs b/src/Foundatio/Queues/InMemoryQueue.cs index aee97c3d..3b986173 100644 --- a/src/Foundatio/Queues/InMemoryQueue.cs +++ b/src/Foundatio/Queues/InMemoryQueue.cs @@ -392,7 +392,9 @@ public override Task DeleteQueueAsync() _logger.LogError(ex, "DoMaintenance Error: {Message}", ex.Message); } - return minAbandonAt; + // Add a tiny buffer just in case the schedule next timer fires early. + // The system clock typically has a resolution of 10-15 milliseconds, so timers cannot be more accurate than this resolution. + return minAbandonAt.SafeAdd(TimeSpan.FromMilliseconds(10)); } public override void Dispose()