Skip to content

Do not hold the peer map lock during the peerDBNetworkWalk#1638

Merged
mavenugo merged 1 commit intomoby:masterfrom
aboch:ovlk
Feb 7, 2017
Merged

Do not hold the peer map lock during the peerDBNetworkWalk#1638
mavenugo merged 1 commit intomoby:masterfrom
aboch:ovlk

Conversation

@aboch
Copy link
Copy Markdown
Contributor

@aboch aboch commented Feb 7, 2017

Otherwise it can lead to dead lock.

For example a dead lock on the channel send, if the walking function is pushLocalEndpointEvent waiting on the event channel (size 1) to be drained, while the drainer function serfLoop is blocked while processing an event which also locks on the nMap.Lock() itself.

Signed-off-by: Alessandro Boch [email protected]

@mavenugo
Copy link
Copy Markdown
Contributor

mavenugo commented Feb 7, 2017

LGTM

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.

2 participants