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;