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

Update app.js #26

Merged
merged 1 commit into from Mar 25, 2014
Merged

Update app.js #26

merged 1 commit into from Mar 25, 2014

Conversation

avikpal
Copy link
Contributor

@avikpal avikpal commented Mar 25, 2014

To fix problems arising due to the asynchronous nature of .listen(). Really it should be doing that console.log call inside a callback passed to listen. When the host is added, it tries to do a DNS lookup, which is async. So when that line tries to fetch the address, there isn't one yet because the DNS request is running, so it crashes.

To fix problems arising due to the asynchronous nature of .listen(). Really it should be doing that console.log call inside a callback passed to listen. When the host is added, it tries to do a DNS lookup, which is async. So when that line tries to fetch the address, there isn't one yet because the DNS request is running, so it crashes.
alexyoung pushed a commit that referenced this pull request Mar 25, 2014
@alexyoung alexyoung merged commit 2320706 into alexyoung:master Mar 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants