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

FMS-1249 #33

Merged
merged 2 commits into from
Mar 17, 2023
Merged

FMS-1249 #33

merged 2 commits into from
Mar 17, 2023

Conversation

krehermann
Copy link
Contributor

@krehermann krehermann commented Mar 17, 2023

Fix data race access through the library.

Various races where uncovered by running the main branch with go test -race ./...

Fix data race access to client connection

Various test failures in the chainlink repo report the data race
access the conn.

This change wraps all the cc.conn with the existing mutex
@krehermann krehermann marked this pull request as ready for review March 17, 2023 15:39
Comment on lines +373 to +377
cc.mu.RLock()
cc.conn.mu.RLock()
tr = cc.conn.transport
cc.conn.mu.RUnlock()
cc.mu.RUnlock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use getters to simplify this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. that is the clean up we should do. the first priority was to make it work since it's blocking many merges in the chainlink repo

@jkongie jkongie merged commit 382a1ac into main Mar 17, 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.

3 participants