From c6e1a44581285ce3e8ddfcfd89b766d81fccead3 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 9 Apr 2021 15:00:10 -0700 Subject: [PATCH] Fix for #2498 --- amt/amt-wsman-comm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amt/amt-wsman-comm.js b/amt/amt-wsman-comm.js index 608f171d..d243ea18 100644 --- a/amt/amt-wsman-comm.js +++ b/amt/amt-wsman-comm.js @@ -76,7 +76,7 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, mpsConn function SerialTunnel(options) { var obj = new require('stream').Duplex(options); obj.forwardwrite = null; - obj.updateBuffer = function (chunk) { this.push(chunk); }; + obj.updateBuffer = function (chunk) { try { this.push(chunk); } catch (ex) { } }; obj._write = function (chunk, encoding, callback) { if (obj.forwardwrite != null) { obj.forwardwrite(chunk); } else { console.err("Failed to fwd _write."); } if (callback) callback(); }; // Pass data written to forward obj._read = function (size) { }; // Push nothing, anything to read should be pushed from updateBuffer() return obj;