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

syncer: Return error from Connect if Syncer is closed #154

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

lukechampine
Copy link
Member

Fixes #100

@ChrisSchinnerl
Copy link
Member

Looking good. Any chance other exposed methods would cause similar issues? Or is it just connect since it creates a new outgoing connection?

syncer/syncer.go Outdated Show resolved Hide resolved
syncer/syncer.go Outdated Show resolved Hide resolved
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl left a comment

Choose a reason for hiding this comment

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

Changed it to use a dedicated closed boolean to avoid accidentally causing panics when dereferencing nil pointers. Also added a quick test to confirm we receive the right error when calling Connect.

syncer/syncer.go Show resolved Hide resolved
@ChrisSchinnerl ChrisSchinnerl merged commit 3c2bc0e into master Jan 23, 2025
10 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the syncer-close branch January 23, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fix deadlock in syncer
4 participants