Skip to content

Commit

Permalink
Merge pull request #260 from dennis-tra/dev
Browse files Browse the repository at this point in the history
Fix concurrent map iteration and map write error on GetMemberPIDs
  • Loading branch information
potterdai committed Nov 30, 2018
2 parents f5cb0c4 + e4a2f7c commit aa58a65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cluster/cluster.go
Expand Up @@ -100,8 +100,11 @@ func Get(name string, kind string) (*actor.PID, remote.ResponseStatusCode) {
}
}

// Get PIDs of members for the specified kind
// GetMemberPIDs returns PIDs of members for the specified kind
func GetMemberPIDs(kind string) actor.PIDSet {
memberList.mutex.RLock()
defer memberList.mutex.RUnlock()

pids := actor.PIDSet{}
if memberList == nil {
return pids
Expand Down

0 comments on commit aa58a65

Please sign in to comment.