Comparing version 2.7.1-1 to 2.7.1-2
@@ -46,3 +46,3 @@ "use strict"; | ||
const dns = require("dns"); | ||
const VERSION = "2.7.1-1"; | ||
const VERSION = "2.7.1-2"; | ||
const LANG = "nats.js"; | ||
@@ -328,8 +328,19 @@ class NodeTransport { | ||
const d = (0, nats_base_client_1.deferred)(); | ||
this.socket.write(frame, (err) => { | ||
if (err) { | ||
return d.reject(err); | ||
try { | ||
this.socket.write(frame, (err) => { | ||
if (err) { | ||
if (this.options.debug) { | ||
console.error(`!!! ${(0, nats_base_client_1.render)(frame)}: ${err}`); | ||
} | ||
return d.reject(err); | ||
} | ||
return d.resolve(); | ||
}); | ||
} | ||
catch (err) { | ||
if (this.options.debug) { | ||
console.error(`!!! ${(0, nats_base_client_1.render)(frame)}: ${err}`); | ||
} | ||
return d.resolve(); | ||
}); | ||
d.reject(err); | ||
} | ||
return d; | ||
@@ -339,3 +350,3 @@ } | ||
const p = this._send(frame); | ||
p.catch((err) => { | ||
p.catch((_err) => { | ||
// we ignore write errors because client will | ||
@@ -342,0 +353,0 @@ // fail on a read or when the heartbeat timer |
{ | ||
"name": "nats", | ||
"version": "2.7.1-1", | ||
"version": "2.7.1-2", | ||
"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
655091
10492