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 race around read and write deadlines in Stream #52

Merged
merged 2 commits into from
Dec 19, 2017

Conversation

filipochnik
Copy link
Contributor

I found this race condition when running my code using yamux with -race.

Since the test suite fails when run with -race I don't think I can write a meaningful test here.

@jefferai
Copy link
Member

I think it is likely to be faster to use an atomic.Value here, since it is only being read in one place and written in another.

@filipochnik
Copy link
Contributor Author

Sure, I changed it to atomic.Value :)

@jefferai
Copy link
Member

Thanks!

@jefferai jefferai merged commit 683f491 into hashicorp:master Dec 19, 2017
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