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: Eliminate race conditions in reconnect feature. #2285

Merged
merged 3 commits into from
Mar 12, 2024
Merged

Conversation

mturoci
Copy link
Collaborator

@mturoci mturoci commented Mar 12, 2024

Reconnect feature stabilization.

This PR adds R/W synchronization to client state shared across multiple goroutines, preventing race conditions. A simple state machine is used for the synchronization.

@mturoci mturoci requested a review from lo5 as a code owner March 12, 2024 13:03
@mturoci mturoci requested review from lo5 and geomodular March 12, 2024 13:03
client.go Show resolved Hide resolved
client.go Show resolved Hide resolved
client.go Show resolved Hide resolved
geomodular
geomodular previously approved these changes Mar 12, 2024
Copy link
Contributor

@geomodular geomodular left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Martin!

client.go Show resolved Hide resolved
@mturoci mturoci merged commit 1658a6a into main Mar 12, 2024
2 checks passed
@mturoci mturoci deleted the fix/reconnect-race branch March 12, 2024 19:35
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