Permalink
Browse files

Fixed ephemeral port support. Closes #88

  • Loading branch information...
1 parent c79f0db commit cbcb0d80e34209f3e4d834755a031fc01a47951c @tj tj committed Aug 16, 2011
Showing with 15 additions and 1 deletion.
  1. +1 −1 lib/master.js
  2. +14 −0 test/test.ephemeral.js
View
@@ -439,7 +439,7 @@ Master.prototype.createSocket = function(fn){
} else if ('string' == typeof this.port) {
fn(null, socket('unix'));
// only port
- } else if (this.port) {
+ } else if ('number' == typeof this.port) {
fn(null, socket('tcp4'));
}
};
View
@@ -0,0 +1,14 @@
+
+/**
+ * Module dependencies.
+ */
+
+var cluster = require('../')
+ , http = require('http')
+ , app = http.createServer();
+
+cluster(app)
+ .set('workers', 2)
+ .listen(0)
+ .on('listening', process.exit);
+

0 comments on commit cbcb0d8

Please sign in to comment.