diff --git a/lib/net.js b/lib/net.js index 28e733bc139..61b103a85da 100644 --- a/lib/net.js +++ b/lib/net.js @@ -972,6 +972,7 @@ Server.prototype._listen = function() { var backlog = toNumber(arguments[1]) || toNumber(arguments[2]); var TCP = process.binding('tcp_wrap').TCP; + var Pipe = process.binding('pipe_wrap').Pipe; if (arguments.length == 0 || typeof arguments[0] == 'function') { // Bind to a random port. @@ -984,7 +985,7 @@ Server.prototype._listen = function() { } else if (h.handle) { h = h.handle; } - if (h instanceof TCP) { + if (h instanceof TCP || h instanceof Pipe) { self._handle = h; listen(self, null, -1, -1, backlog); } else if (typeof h.fd === 'number' && h.fd >= 0) {