New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vault-high-availability

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vault-high-availability - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

2

package.json
{
"name": "vault-high-availability",
"version": "1.0.27",
"version": "1.0.28",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -42,20 +42,26 @@ 'use strict';

request.get((urlLib.format(urlWithIpObject)) + "v1/sys/leader", {
timeout: 1000,
timeout: 500,
gzip: true
}, function (error, response, body) {
log.debug("leader response for ip: ", address, "body: ", body, "error: ", error);
var jsonBody = null;
try {
jsonBody = JSON.parse(body);
} catch (e) {
log.debug("response wasn't in json format", body)
if(error) {
log.error("An error happened while trying to resolve vault dns",error);
callbackAsync();
}
else {
log.debug("leader response for ip: ", address, "body: ", body, "error: ", error);
var jsonBody = null;
try {
jsonBody = JSON.parse(body);
} catch (e) {
log.debug("response wasn't in json format", body)
}
if (response && response.statusCode === 200 && jsonBody && jsonBody.is_self === true) {
log.info("leader found: ", address);
newIp = address.address;
} else {
log.debug("not the leader: ", address);
if (response && response.statusCode === 200 && jsonBody && jsonBody.is_self === true) {
log.info("leader found: ", address);
newIp = address.address;
} else {
log.debug("not the leader: ", address);
}
callbackAsync();
}
callbackAsync();
});

@@ -62,0 +68,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc