net: remove Socket.prototype.listen

The function was never documented and now throws a TypeError if used.

PR-URL: https://github.com/nodejs/node/pull/13735
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit is contained in:
Ruben Bridgewater 2017-12-06 14:48:37 -02:00
parent b961d9fd83
commit e17dba7a45
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -380,15 +380,6 @@ Socket.prototype.read = function(n) {
return this.read(n);
};
// FIXME(joyeecheung): this method is neither documented nor tested
Socket.prototype.listen = function() {
debug('socket.listen');
this.on('connection', arguments[0]);
listenInCluster(this, null, null, null);
};
Socket.prototype.setTimeout = function(msecs, callback) {
if (msecs === 0) {
timers.unenroll(this);