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

Infiinte Loop with MaxDate for GetOccurrences #364

Closed
wants to merge 3 commits into from

Conversation

dsbegnoche
Copy link

Fixes bug when GetOccurrences ends on MaxDate and only Count is set, an
error is thrown inside an infinite loop

Fixes bug when GetOccurrences ends on MaxDate and only Count is set, an
error is thrown inside an infinite loop
@@ -259,11 +259,21 @@ private void EnforceEvaluationRestrictions(RecurrencePattern pattern)
break;
}

if (pattern.Until != DateTime.MinValue && candidate != DateTime.MinValue && candidate > pattern.Until)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition is exact duplicate of the above statement, therefore it should be removed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. This was an accident. Removed the duplication. @pomoika

@mscrivo
Copy link

mscrivo commented May 23, 2018

Running into this as well after upgrading from 3.0.6 to 4.1.2 .. any reason this hasn't been merged in yet?

@dsbegnoche
Copy link
Author

@rianjs Any chance we can get this reviewed and merged? This bug is preventing us from upgrading to latest version.

@rianjs rianjs closed this in 40611fb Apr 10, 2021
rianjs added a commit that referenced this pull request Apr 10, 2021
Fix Infinite Loop with MaxDate for GetOccurrences - closes #364
@rianjs
Copy link
Owner

rianjs commented Apr 10, 2021

https://www.nuget.org/packages/Ical.Net/4.2.0

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

Successfully merging this pull request may close these issues.

None yet

4 participants