From 558d62178477b4e0d0781562a0a1cf31f07ac964 Mon Sep 17 00:00:00 2001 From: nic Date: Mon, 6 May 2019 09:45:25 +0200 Subject: [PATCH] removed unnecessary Buffer.toString() with hardcoded utf8 encoding --- lib/Connection.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index 619862ff..58c438d7 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1745,12 +1745,8 @@ Connection.prototype._processQueue = function() { Connection.prototype._sockWriteAppendData = function(appendData) { - var val = appendData; - if (Buffer.isBuffer(appendData)) - val = val.toString('utf8'); - - this.debug && this.debug('=> ' + inspect(val)); - this._sock.write(val); + this.debug && this.debug('=> ' + inspect(appendData)); + this._sock.write(appendData); this._sock.write(CRLF); };