diff --git a/examples/entityScripts/tribble.x.39.js b/examples/entityScripts/tribble.x.40.js similarity index 98% rename from examples/entityScripts/tribble.x.39.js rename to examples/entityScripts/tribble.x.40.js index 804666d344..7dd2fe3aa5 100644 --- a/examples/entityScripts/tribble.x.39.js +++ b/examples/entityScripts/tribble.x.40.js @@ -1,6 +1,6 @@ (function () { // See tests/performance/tribbles.js - Script.include("../libraries/virtualBaton.41.js"); + Script.include("../libraries/virtualBaton.42.js"); var dimensions, oldColor, entityID, editRate = 60, moveRate = 1, diff --git a/examples/libraries/virtualBaton.41.js b/examples/libraries/virtualBaton.42.js similarity index 99% rename from examples/libraries/virtualBaton.41.js rename to examples/libraries/virtualBaton.42.js index a472a9fdda..fd81671c44 100644 --- a/examples/libraries/virtualBaton.41.js +++ b/examples/libraries/virtualBaton.42.js @@ -219,7 +219,7 @@ function virtualBatonf(options) { var response = {proposalNumber: data.number, proposerId: data.proposerId}; if (betterNumber(data, bestProposal)) { bestProposal = data; - if (accepted.winner) { + if (accepted.winner && connectionTest(accepted.winner)) { response.number = accepted.number; response.winner = accepted.winner; } @@ -330,7 +330,7 @@ function virtualBatonf(options) { exports.recheckWatchdog = timers.setInterval(function recheck() { var holder = acceptedId(); // If we're waiting and we notice the holder is gone, ... if (holder && claimCallback && !electionWatchdog && !connectionTest(holder)) { - accepted.winner = bestPromise.winner = null; + bestPromise.winner = null; // used if the quorum agrees that old winner is not there propose(); // ... propose an election. } }, recheckInterval);