This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Make listenFD just DTRT after warning

  • Loading branch information...
isaacs committed Jun 16, 2012
1 parent 55ef9ef commit 41421ff9da1288aa241a5e9dcf915b685ade1c23
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/net.js
View
@@ -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

0 comments on commit 41421ff

Please sign in to comment.