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: Remove sub changes request when timeout happens #274

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

hiohiohio
Copy link
Contributor

Context:

  • putting a request message into c.subChanges blocks process with having c.pendingSubChangeMutex.Lock() when subscribe request is called twice during disconnection
  • this leads deadlock to wait c.pendingSubChangeMutex.Lock() in connWriter() when reconnecting

Changes:

  • drain c.subChanges channel when timeout happens. expecting this happens only when disconnected as c.subChanges are consumed before the timeout by connWriter() if connected.

@hiohiohio hiohiohio requested a review from gnvk March 26, 2024 05:03
Copy link
Collaborator

@gnvk gnvk left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this @hiohiohio !

@gnvk gnvk merged commit c680bac into master Mar 26, 2024
3 checks passed
@gnvk gnvk deleted the remove-sub-changes-request-when-timeout branch March 26, 2024 07:51
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.

2 participants