Skip to content

Commit

Permalink
Don't feed Leader msgs to the runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomezferro committed Oct 24, 2012
1 parent 6377a46 commit 2ca4b1c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -262,6 +264,7 @@ public synchronized void messageReceived(ChannelHandlerContext ctx, MessageEvent
} else {
leader = -1;
}
return;
}
if (message instanceof ServerHello) {
ServerHello hello = (ServerHello) e.getMessage();
Expand Down

0 comments on commit 2ca4b1c

Please sign in to comment.