Skip to content

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