Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster doesn't start when the port parameter of listen() is a string. #158

Open
c4milo opened this issue Oct 9, 2011 · 5 comments
Open

Comments

@c4milo
Copy link

c4milo commented Oct 9, 2011

steps to reproduce:

  1. Just use .listen('3000') instead of .listen(3000)

expected:
the service starts normally on port 3000

current result:
The service doesn't start and a socket file 3000 is created in the current path.

@rauchg
Copy link

rauchg commented Oct 9, 2011

We should probably copy the impl of net#listen, which performs conversion.

@tj
Copy link
Contributor

tj commented Oct 9, 2011

node does that? because you can use a local sock path as well as a string, maybe they parseInt and check NaN then default to a path or something :s seems a little weird, I would expect people to parseInt() if they really want a portno

@rauchg
Copy link

rauchg commented Oct 9, 2011

i'm guessing they do port == Number(port) first

@rauchg
Copy link

rauchg commented Oct 9, 2011

@rauchg
Copy link

rauchg commented Oct 9, 2011

I can see this being useful for stuff like process.env.CLUSTER_PORT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants