mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
connectionTest
This commit is contained in:
parent
b6472217c4
commit
e52b910e53
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
|
@ -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);
|
Loading…
Reference in a new issue