summaryrefslogtreecommitdiff
path: root/same/src/main/java/com
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-24 15:00:56 +0200
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-24 15:00:56 +0200
commitb78972404f4b0a5dbccb6849021c2ca2d5e8bb46 (patch)
tree66d59a289a551c422bbd46ed4f17b94cf6144250 /same/src/main/java/com
parent28cbbdd9dfc097a0fc9a6c18a885e9bb50419f91 (diff)
Fix off-by-one error in MasterProposer.
Diffstat (limited to 'same/src/main/java/com')
-rw-r--r--same/src/main/java/com/orbekk/paxos/MasterProposer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/same/src/main/java/com/orbekk/paxos/MasterProposer.java b/same/src/main/java/com/orbekk/paxos/MasterProposer.java
index bc4f18d..048995e 100644
--- a/same/src/main/java/com/orbekk/paxos/MasterProposer.java
+++ b/same/src/main/java/com/orbekk/paxos/MasterProposer.java
@@ -66,7 +66,7 @@ public class MasterProposer extends Thread {
private void checkDone() {
if (done.getCount() > 0) {
- if (numPromises.get() >= numRequests / 2) {
+ if (numPromises.get() > numRequests / 2) {
result.set(proposalNumber);
done.countDown();
} else if (numResponses.get() >= numRequests) {