Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtensionCadence throws error when trying to pass in Timeout.InfiniteTimeSpan #131

Closed
Skier23 opened this issue Jun 15, 2022 · 2 comments
Closed

Comments

@Skier23
Copy link

Skier23 commented Jun 15, 2022

When trying to pass in Timeout.InfiniteTimeSpan to RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence, I get an error message: extensionCadence must be less than expiry 00:00:01. To disable auto-extension, specify Timeout.InfiniteTimeSpan...

@Skier23
Copy link
Author

Skier23 commented Jun 15, 2022

It looks like this line (148) of RedisSynchronizationOptionsBuilder.cs:
if (specifiedExtensionCadence.CompareTo(minValidityTime) >= 0)

should be:

if (!specifiedExtensionCadence.IsInfinite && specifiedExtensionCadence.CompareTo(expiry) >= 0)

@madelson
Copy link
Owner

Hi @Skier23 thanks for filing.

This is a real bug and actually a duplicate of #130 . Therefore, I'm going to close. Something I'd like to understand is your reason for wanting to disable auto-extension; if you view the discussion on the linked issue you can see that we determined that this wasn't actually the right course of action for the OP's use-case. Would you mind commenting about your use-case on #130 ?. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants