Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

addrbook: fix races #154

Merged
merged 2 commits into from
Jun 5, 2020
Merged

addrbook: fix races #154

merged 2 commits into from
Jun 5, 2020

Conversation

jsign
Copy link
Contributor

@jsign jsign commented Jun 5, 2020

Record was used without guard.
Was racy with setAddr: pr.Addrs = append(pr.Addrs, entries...)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Copy link
Contributor

@vyzo vyzo left a comment

Choose a reason for hiding this comment

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

thanks for tackling this.

pstoreds/addr_book.go Show resolved Hide resolved
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
@jsign
Copy link
Contributor Author

jsign commented Jun 5, 2020

Added another fix for #153
Close #153

@jsign jsign changed the title addrbook: fix race addrbook: fix races Jun 5, 2020
@vyzo vyzo merged commit 9827ee0 into libp2p:master Jun 5, 2020
@vyzo
Copy link
Contributor

vyzo commented Jun 5, 2020

thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants