mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 17:23:29 +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 () {
|
(function () {
|
||||||
// See tests/performance/tribbles.js
|
// See tests/performance/tribbles.js
|
||||||
Script.include("../libraries/virtualBaton.41.js");
|
Script.include("../libraries/virtualBaton.42.js");
|
||||||
var dimensions, oldColor, entityID,
|
var dimensions, oldColor, entityID,
|
||||||
editRate = 60,
|
editRate = 60,
|
||||||
moveRate = 1,
|
moveRate = 1,
|
|
@ -219,7 +219,7 @@ function virtualBatonf(options) {
|
||||||
var response = {proposalNumber: data.number, proposerId: data.proposerId};
|
var response = {proposalNumber: data.number, proposerId: data.proposerId};
|
||||||
if (betterNumber(data, bestProposal)) {
|
if (betterNumber(data, bestProposal)) {
|
||||||
bestProposal = data;
|
bestProposal = data;
|
||||||
if (accepted.winner) {
|
if (accepted.winner && connectionTest(accepted.winner)) {
|
||||||
response.number = accepted.number;
|
response.number = accepted.number;
|
||||||
response.winner = accepted.winner;
|
response.winner = accepted.winner;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ function virtualBatonf(options) {
|
||||||
exports.recheckWatchdog = timers.setInterval(function recheck() {
|
exports.recheckWatchdog = timers.setInterval(function recheck() {
|
||||||
var holder = acceptedId(); // If we're waiting and we notice the holder is gone, ...
|
var holder = acceptedId(); // If we're waiting and we notice the holder is gone, ...
|
||||||
if (holder && claimCallback && !electionWatchdog && !connectionTest(holder)) {
|
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.
|
propose(); // ... propose an election.
|
||||||
}
|
}
|
||||||
}, recheckInterval);
|
}, recheckInterval);
|
Loading…
Reference in a new issue