Re-enable ability to listen on UNIX domain sockets

This commit is contained in:
Patrick Mooney 2013-10-29 23:29:21 -05:00
parent 5d91284e57
commit d4a9d371f0
1 changed files with 2 additions and 2 deletions

View File

@ -651,8 +651,8 @@ Server.prototype.after = function () {
// All these just reexpose the requisite net.Server APIs
Server.prototype.listen = function (port, host, callback) {
if (typeof port !== 'number')
throw new TypeError('port (number) required');
if (typeof (port) !== 'number' && typeof (port) !== 'string')
throw new TypeError('port (number or path) required');
if (typeof (host) === 'function') {
callback = host;