From 2d3f369cfc775a69d1615ac150516b906cd83a1c Mon Sep 17 00:00:00 2001 From: Reuben Bond Date: Fri, 20 Oct 2023 12:46:46 -0700 Subject: [PATCH] Prevent setting values less than MinAgeLimit --- src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs b/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs index fc3a3cf763..9ba8673499 100644 --- a/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs +++ b/src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs @@ -79,7 +79,7 @@ private TimeSpan CalculateValue() var span = AlwaysActive ? TimeSpan.FromDays(short.MaxValue) : TimeSpan.FromDays(Days) + TimeSpan.FromHours(Hours) + TimeSpan.FromMinutes(Minutes); - return span <= TimeSpan.Zero + return span < MinAgeLimit ? MinAgeLimit : span; }