Refactor Paxos status call to remove type assertion
This commit is contained in:
1 parent
768e2a31fa
commit
0c59de40e7
4 files changed
+14
-6
No files matched your search
+1
-1
@@ -767,7 +767,7 @@ func (alloc *Allocator) update(sender mesh.PeerName, msg []byte) error {
|
||||
// (if we did so on periodic gossip we would force consensus unnecessarily)
|
||||
// * If we are an elector (to avoid a broadcast storm of ring request messages)
|
||||
default:
|
||||
if _, ok := alloc.paxos.(*paxos.Node); ok && sender != mesh.UnknownPeerName {
|
||||
if alloc.paxos.IsElector() && sender != mesh.UnknownPeerName {
|
||||
alloc.establishRing()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user