Permalink
Browse files

Accept a port of value zero:

This lets the operating system select the port to listen to.

To figure out which port to use, call the method address()
on the returned server.
  • Loading branch information...
1 parent 3aed873 commit c659b813aa50be82ccda715624e96e13da2255c5 @rngadam rngadam committed Nov 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -108,7 +108,7 @@ dnode.prototype.listen = function () {
server.sessions = {};
- if (params.port) {
+ if(typeof params.port === 'number' && params.port >= 0) {
server.listen(params.port, params.host);
}
else if (params.path) {

0 comments on commit c659b81

Please sign in to comment.