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

Commit

Permalink
Make listenFD just DTRT after warning
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jun 16, 2012
1 parent 55ef9ef commit 41421ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/net.js
Expand Up @@ -1072,8 +1072,13 @@ Server.prototype._emitCloseIfDrained = function() {
};


var listenFDwarn = false;
Server.prototype.listenFD = function(fd, type) {
throw new Error('This API is no longer supported. See child_process.fork');
if (!listenFDwarn) {
console.error('listenFD is deprecated. Use server.listen()');
listenFDwarn = true;
}
this.listen({ fd: fd });
};

// when sending a socket using fork IPC this function is executed
Expand Down

0 comments on commit 41421ff

Please sign in to comment.