Skip to content

Commit

Permalink
applied patch by Gray Watson
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Aug 22, 2009
1 parent 1c85850 commit b89fbcb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/org/jgroups/protocols/pbcast/ClientGmsImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <code>ViewChange</code> which is called by the coordinator that was contacted by this client, to
* tell the client what its initial membership is.
* @author Bela Ban
* @version $Revision: 1.73 $
* @version $Revision: 1.74 $
*/
public class ClientGmsImpl extends GmsImpl {
private final Promise<JoinRsp> join_promise=new Promise<JoinRsp>();
Expand Down Expand Up @@ -288,6 +288,13 @@ private Address determineCoord(List<PingData> mbrs) {
}
}
}
// we have seen members say someone else is coordinator but they disagree
for(PingData mbr:mbrs) {
// remove members who don't agree with the election (Florida)
if (votes.containsKey(mbr.getAddress()) && (!mbr.isCoord())) {
votes.remove(mbr.getAddress());
}
}

if(votes.size() > 1) {
if(log.isWarnEnabled()) log.warn("there was more than 1 candidate for coordinator: " + votes);
Expand Down Expand Up @@ -337,4 +344,4 @@ void becomeSingletonMember(Address mbr) {
if(log.isDebugEnabled()) log.debug("created group (first member). My view is " + gms.view_id +
", impl is " + gms.getImpl().getClass().getName());
}
}
}

0 comments on commit b89fbcb

Please sign in to comment.