Skip to content
Snippets Groups Projects
Commit 430eb211 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Fix error when no peers found

parent a6fca6a1
No related branches found
No related tags found
1 merge request!647[enh] If node unreachable, select a random UP fallback peer
Pipeline #15784 skipped
......@@ -206,12 +206,14 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
var now = Date.now();
console.info("[platform] Checking if node is synchronized...");
csNetwork.getSynchronizedBmaPeers(BMA, {
return csNetwork.getSynchronizedBmaPeers(BMA, {
timeout: Math.min(csConfig.timeout, 3000 /*3s max*/)
})
.then(function(peers) {
console.info("[platform] Network scanned in {0}ms, {1} peers (UP and synchronized) found".format(Date.now() - now, peers.length));
if (!peers.length) return; // No peer found: exit
// TODO: store sync peers in storage ?
//csSettings.data.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment