Skip to content

Fix AsyncRx GroupByUntil double OnCompletedAsync bug #2201

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

idg10
Copy link
Collaborator

@idg10 idg10 commented Apr 30, 2025

Fixes #2200

When the upstream source for a GroupByUntil completes, the GroupByUntil completes all current groups. However, it didn't remove those groups from the list of current groups as it did so, which meant that when those groups unsubscribed from their duration-defining observables, those duration-defining observables would in turn complete, which would then cause the GroupByUntil to try to complete these groups a second time (because the main OnCompletedAsync handling wasn't removing the groups from its list of current groups as it removed them).

This now removes groups from the list of current groups before calling OnCompletedAsync. (It already did this in the case where groups were removed because they expired. This change means it also does it in the case where they are being removed due to the whole operator shutting down.)

@idg10 idg10 self-assigned this Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AsyncRx.NET GroupByUntil can crash when group keys reused
1 participant