vault-high-availability
Advanced tools
Comparing version 1.0.23 to 1.0.24
@@ -33,3 +33,3 @@ /** | ||
logger.debug("Going to find the vault leader task"); | ||
addressResolver.findActiveIp(); | ||
addressResolver.findActiveIp(callback); | ||
}); | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "vault-high-availability", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,3 +15,3 @@ 'use strict'; | ||
var findActiveIp = function () { | ||
var findActiveIp = function (callback) { | ||
log.info("will look for active ip only if isResolving is false"); | ||
@@ -69,12 +69,13 @@ if (!this.isResolving) { | ||
log.info("active node set", id, new Date(), newIp); | ||
return; | ||
// try { | ||
// log.debug("Going to call the callback function..."); | ||
// return callback(); | ||
// }catch(err){ | ||
// log.error("An error happened while trying to call callback function",err); | ||
// return function () { | ||
// log.error("Succeed to find the leader but there is an issue with calling callback function"); | ||
// } | ||
// } | ||
log.debug("Going to call the callback function..."); | ||
try { | ||
setTimeout(function () { | ||
return function () { | ||
log.error("Succeed to find the leader but there is an issue with calling callback function"); | ||
} | ||
},1000); | ||
return callback(); | ||
}catch(err){ | ||
log.error("An error happened while trying to call callback function",err); | ||
} | ||
} else { | ||
@@ -105,4 +106,3 @@ log.info("No active node was found."); | ||
} else { | ||
logger.debug("Finish to find the new leader") | ||
return; | ||
return callback() | ||
} | ||
@@ -109,0 +109,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31775