diff --git a/lib/net.js b/lib/net.js index f962a848fad662..5562db6ed61e38 100644 --- a/lib/net.js +++ b/lib/net.js @@ -701,17 +701,6 @@ protoGetter('localPort', function localPort() { }); -Socket.prototype.write = function(chunk, encoding, cb) { - if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) { - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', - 'chunk', - ['string', 'Buffer'], - chunk); - } - return stream.Duplex.prototype.write.apply(this, arguments); -}; - - Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { // If we are still connecting, then buffer this for later. // The Writable logic will buffer up any more writes while