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: rare deadlock in GetOperationEvents #319

Merged
merged 4 commits into from
Jun 6, 2024
Merged

Conversation

garethgeorge
Copy link
Owner

No description provided.

select {
case errChan <- errors.New("event buffer overflow, closing stream for client retry and catchup"):
default:
}

Choose a reason for hiding this comment

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

This is a semi-decent indication of disconnection/unresponsive client - does this case here result in proper socket disconnection?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes -- the logic is a bit convoluted, I'd like to followup and refactor it to use some better golang patterns, but essentially the function is expected to return with the first error sent to errChan (which also disconnects the client), all following values should be dropped on the floor since there's no longer a connected client to send the errors to.

@garethgeorge garethgeorge merged commit f42df20 into main Jun 6, 2024
6 checks passed
@garethgeorge garethgeorge deleted the garethgeorge-patch-1 branch September 14, 2024 10:39
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