diff --git a/lib/net.js b/lib/net.js index 540f7ce800d520..54c161c382a306 100644 --- a/lib/net.js +++ b/lib/net.js @@ -758,13 +758,7 @@ Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { // Retain chunks if (err === 0) req._chunks = chunks; } else { - var enc; - if (data instanceof Buffer) { - enc = 'buffer'; - } else { - enc = encoding; - } - err = createWriteReq(req, this._handle, data, enc); + err = createWriteReq(req, this._handle, data, encoding); } if (err)