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

addrmgr: Fix race in save peers. #1259

Merged
merged 1 commit into from
Jun 4, 2018

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jun 4, 2018

This modifies the savePeers function in the addrmgr package to lock the mutex before checking if saving is needed because the flag is accessed from multiple goroutines.

This modifies the savePeers function in the addrmgr package to lock the
mutex before checking if saving is needed because the flag is accessed
from multiple goroutines.
@davecgh davecgh force-pushed the addrmgr_save_peers_mutex branch from 0cb663e to b730f98 Compare June 4, 2018 17:08
Copy link
Member

@dajohi dajohi left a comment

Choose a reason for hiding this comment

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

yes

@davecgh davecgh merged commit b730f98 into decred:master Jun 4, 2018
@davecgh davecgh deleted the addrmgr_save_peers_mutex branch June 4, 2018 17:26
@davecgh davecgh added this to the 1.3.0 milestone Jun 5, 2018
JFixby pushed a commit to JFixby/dcrd that referenced this pull request Oct 21, 2018
btcjson: use int64 for GetBlockHeader[Verbose] confirmations
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