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

fix: Concurrent Modification Error in RealtimeMixin Causing Crashes. … #205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

monzim
Copy link

@monzim monzim commented May 31, 2024

Cleanup Unused Channels in RealtimeMixin

What does this PR do?

This pull request addresses the issue of concurrent modification errors in the RealtimeMixin class. Specifically, it modifies the _createSocket and _cleanup methods to avoid modifying collections while iterating over them. This resolves the concurrent modification errors encountered during iteration

Test Plan

I tested these changes by running the application and observing that the concurrent modification errors no longer occur. The specific test plan involved:

  1. Subscribing to multiple real-time channels.
  2. Triggering events to ensure subscriptions work as expected.
  3. Cleaning up unused channels and ensuring no concurrent modification errors are thrown.

Related PRs and Issues

This pull request resolves the following issues:

🐛 Bug Report: RealTime subscribe throws Concurrent modification during iteration: _Map len:0 #200
🐛 Bug Report: Concurrent Modification Error in RealtimeMixin Causing Crashes #203

Have you read the Contributing Guidelines on issues?

Yes

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

1 participant