From ab10b00d7bcd1e55dfc23f2e4c88300a1eecaec9 Mon Sep 17 00:00:00 2001 From: Michael Adelson Date: Thu, 7 Jul 2022 08:21:25 -0400 Subject: [PATCH] Remove confusing error message in Redis options that implied the ability to disable auto-extension. Fix #130 --- .../RedisDistributedSynchronizationOptionsBuilder.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.cs b/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.cs index c46bdf8c..f15c0803 100644 --- a/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.cs +++ b/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.cs @@ -145,12 +145,15 @@ internal static RedisDistributedLockOptions GetOptions(Action= 0) { throw new ArgumentOutOfRangeException( nameof(extensionCadence), specifiedExtensionCadence.TimeSpan, - $"{nameof(extensionCadence)} must be less than {nameof(expiry)} ({expiry.TimeSpan}). To disable auto-extension, specify {nameof(Timeout)}.{nameof(Timeout.InfiniteTimeSpan)}" + $"{nameof(extensionCadence)} must be less than {nameof(expiry)} ({expiry.TimeSpan})" ); } extensionCadence = specifiedExtensionCadence;