Comparing version 1.2.1 to 1.2.2
@@ -34,3 +34,3 @@ /* | ||
*/ | ||
var VERSION = '1.2.1', | ||
var VERSION = '1.2.2', | ||
@@ -373,12 +373,12 @@ DEFAULT_PORT = 4222, | ||
function sanitizeUrl(urlstr) { | ||
if ((/^.*:\/\/.*/).exec(urlstr) === null) { | ||
// Does not have a scheme. | ||
url = 'nats://' + url; | ||
} | ||
var u = url.parse(urlstr); | ||
if (u.port === '') { | ||
u.port = DEFAULT_PORT.toString(); | ||
function sanitizeUrl(host) { | ||
if ((/^.*:\/\/.*/).exec(host) === null) { | ||
// Does not have a scheme. | ||
host = 'nats://' + host; | ||
} | ||
return url.format(u); | ||
var u = url.parse(host); | ||
if (u.port === null || u.port == '') { | ||
host += ":" + DEFAULT_PORT; | ||
} | ||
return host; | ||
} | ||
@@ -446,3 +446,3 @@ | ||
(this.options.tls !== false && this.stream.encrypted !== true)) { | ||
if (undefined === this.options.tls) { | ||
if (undefined === this.options.tls || this.options.tls === false) { | ||
this.options.tls = true; | ||
@@ -449,0 +449,0 @@ } |
{ | ||
"name": "nats", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
"cover": "istanbul cover _mocha", | ||
"lint": "if-node-version >= 4 eslint ./lib ./examples ./benchmark ./test", | ||
"lint": "if-node-version >=4 eslint ./lib ./examples ./benchmark ./test", | ||
"fmt": "js-beautify -n --config crockford.jscsrc -r lib/* test/*.js test/support/*.js examples/* benchmark/*.js" | ||
@@ -40,0 +40,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
89783
9