diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 213a9fae7204416c09e061f4936a566481220af7..ff37f4da3f7da0d63edb8fb69b39f855a9be3019 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -266,8 +266,8 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. else { console.debug('[BMA] Unknown node software [{0} v{1}]: could not check compatibility.'.format(software || '?', json.duniter.version || '?')); } - if (!isCompatible) { - console.error('[BMA] Incompatible node [{0} v{1}]: expected at least v{2}'.format(software, json.duniter.version, csSettings.data.minVersion)); + if (!isCompatible && json && json.duniter) { + console.error('[BMA] Incompatible node [{0} v{1}]: expected at least v{2}'.format(software, json.duniter.version || '?', csSettings.data.minVersion)); } return isCompatible; }) diff --git a/www/js/services/network-services.js b/www/js/services/network-services.js index 28f62358aa65343aea26d8486743ca8dbff17bbd..8809c01ea173c862196c6bc04518a6ed8809b1f1 100644 --- a/www/js/services/network-services.js +++ b/www/js/services/network-services.js @@ -99,10 +99,9 @@ angular.module('cesium.network.services', ['ngApi', 'cesium.currency.services', */ getDefaultTimeout = function () { // Using timeout from settings - if (csSettings.data.expertMode) { - var timeout = csSettings.data.timeout || csConfig.timeout; - console.debug('[network] Using user defined timeout: {0}ms'.format(timeout)); - return timeout; + if (csSettings.data.expertMode && csSettings.data.timeout > 0) { + console.debug('[network] Using user defined timeout: {0}ms'.format(csSettings.data.timeout)); + return csSettings.data.timeout; } // Computing timeout from the connection type @@ -900,7 +899,7 @@ angular.module('cesium.network.services', ['ngApi', 'cesium.currency.services', options.timeout = angular.isDefined(options.timeout) ? options.timeout : getDefaultTimeout(); var now = Date.now(); - console.info('[network] Getting synchronized BMA peers...'); + console.info('[network] Getting synchronized BMA peers... (timeout: {0}ms)'.format(options.timeout)); var wasStarted = isStarted(); var pid = data.pid + 1;