Skip to content
Browse files

Don't feed Leader msgs to the runtime

  • Loading branch information...
1 parent 6377a46 commit 2ca4b1c3319d4c50daed354d6d43b227b2280918 @dgomezferro committed Oct 24, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/yahoo/pasc/paxos/client/PaxosClientHandler.java
View
5 src/main/java/com/yahoo/pasc/paxos/client/PaxosClientHandler.java
@@ -229,7 +229,9 @@ synchronized void resubmitRequest(long timestamp) {
private Random random = new Random();
private void generateClientId() {
- clientId = random.nextInt(MAX_CLIENTS);
+ int newId = random.nextInt(MAX_CLIENTS);
+ LOG.warn("Previous id " + clientId + " newId " + newId);
+ clientId = newId;
}
private void sendHello(Channel c) {
@@ -262,6 +264,7 @@ public synchronized void messageReceived(ChannelHandlerContext ctx, MessageEvent
} else {
leader = -1;
}
+ return;
}
if (message instanceof ServerHello) {
ServerHello hello = (ServerHello) e.getMessage();

0 comments on commit 2ca4b1c

Please sign in to comment.
Something went wrong with that request. Please try again.