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

circuitv2: cleanup relay service properly #2164

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Mar 2, 2023

fixes: #2162

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

I think this fix is correct, but having both a mutex and an atomic makes me feel a bit uncomfortable.

Can we make closed a normal bool and move it under the mutex (in Close)? Close is not a code path that we need to micro-optimize.

@sukunrt
Copy link
Member Author

sukunrt commented Mar 2, 2023

that would be better. I'll change this.

@sukunrt sukunrt force-pushed the relay-svc-race branch 2 times, most recently from aaf135c to 0f30657 Compare March 2, 2023 18:27
@marten-seemann marten-seemann merged commit 03f4762 into libp2p:master Mar 2, 2023
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.

circuit v2: relay service not cleaned up properly on close
2 participants