-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
protocol: fixed deadline datarace #86 #87
Conversation
Thanks @mschneider82! Could you please turn on race mode for testing to prove this works (as it looks it does)? |
I have added a nil check for atomic.Value with default time.Time{} (no deadline timeout) because TestPassthrough failed. In case no deadline was set |
@pires i have tested it local with -race on. i will add -race to github actions |
done, ready for review & merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, @mschneider82!
Fixed the race by using atomic.Value instead of unprotected time.Time
It was nessasarry to restructure the Conn struct because of this:
struct of size 80 could be 72 (fieldalignment)