-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The account and name fields of a client are not set until they are received via a mining.authorize message and the account field is accessed from separate goroutines which is a race. This corrects that issue by introducing a separate mutex to protect both the account and the name field and updating all references to by protected by the mutex accordingly. The name field doesn't appear to be used anywhere currently, however, it would also be a race to access it without the mutex for the same reason, so this takes the opportunity to ensure it is protected in case it is used in the future.
- Loading branch information
1 parent
c997341
commit 3a35654
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters