Comparing version 0.7.16 to 0.7.18
@@ -26,3 +26,3 @@ /*! | ||
var VERSION = '0.7.16', | ||
var VERSION = '0.7.18', | ||
@@ -486,3 +486,4 @@ DEFAULT_PORT = 4222, | ||
'verbose' : this.options.verbose, | ||
'pedantic': this.options.pedantic | ||
'pedantic': this.options.pedantic, | ||
'protocol': 1, | ||
}; | ||
@@ -499,3 +500,2 @@ if (this.user !== undefined) { | ||
} | ||
// If we enqueued requests before we received INFO from the server, or we | ||
@@ -803,2 +803,29 @@ // reconnected, there be other data pending, write this immediately instead | ||
} | ||
// Always try to read the connect_urls from info | ||
if(client.info.connect_urls && client.info.connect_urls.length > 0) { | ||
// don't add duplicates | ||
var known = []; | ||
client.servers.forEach(function(server) { | ||
known.push(server.url.href); | ||
}); | ||
// add new ones | ||
var toAdd = []; | ||
client.info.connect_urls.forEach(function(server) { | ||
var u = 'nats://' + server; | ||
if(known.indexOf(u) === -1) { | ||
toAdd.push(new Server(url.parse(u))); | ||
} | ||
}); | ||
if(toAdd.length > 0) { | ||
if(client.options.noRandomize !== true) { | ||
shuffle(toAdd); | ||
} | ||
toAdd.forEach(function(s) { | ||
client.servers.push(s); | ||
}); | ||
} | ||
} | ||
// Process first INFO | ||
@@ -805,0 +832,0 @@ if (client.infoReceived === false) { |
{ | ||
"name": "nats", | ||
"version": "0.7.16", | ||
"version": "0.7.18", | ||
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
2
48830
6
1293