Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
net: Improve Socket.prototype.write()
Browse files Browse the repository at this point in the history
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
JacksonTian authored and trevnorris committed Sep 3, 2014
1 parent a054f8e commit 4bd396a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net.js
Expand Up @@ -606,7 +606,7 @@ Socket.prototype.__defineGetter__('localPort', function() {
Socket.prototype.write = function(chunk, encoding, cb) {
if (!util.isString(chunk) && !util.isBuffer(chunk))
throw new TypeError('invalid data');
return stream.Duplex.prototype.write.apply(this, arguments);
return stream.Duplex.prototype.write.call(this, chunk, encoding, cb);
};


Expand Down

0 comments on commit 4bd396a

Please sign in to comment.