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

doc net: incorrect error handling documented for listen() #5345

Closed
trevnorris opened this issue Feb 21, 2016 · 1 comment
Closed

doc net: incorrect error handling documented for listen() #5345

trevnorris opened this issue Feb 21, 2016 · 1 comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. net Issues and PRs related to the net subsystem.

Comments

@trevnorris
Copy link
Contributor

Under the section https://nodejs.org/api/net.html#net_server_address it states that the error is passed to the listen() callback. This is incorrect. The error is passed to the server's 'error' event handler. Like so:

net.createServer()
  .on('error', () => console.log('foo'))
  .listen(80, () => console.log('bar'));
// Output: foo

Filing this instead of simply fixing this one occurrence b/c unsure if more cases like this exist, and don't have the time to investigate at the moment.

@trevnorris trevnorris added doc Issues and PRs related to the documentations. net Issues and PRs related to the net subsystem. labels Feb 21, 2016
@evanlucas evanlucas added the good first issue Issues that are suitable for first-time contributors. label Feb 21, 2016
dirceu added a commit to dirceu/node that referenced this issue Feb 21, 2016
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: nodejs#5345
PR-URL: nodejs#5353
@evanlucas
Copy link
Contributor

Fixed by 581606a

rvagg pushed a commit that referenced this issue Feb 27, 2016
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: #5345
PR-URL: #5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
rvagg pushed a commit that referenced this issue Feb 27, 2016
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: #5345
PR-URL: #5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins pushed a commit that referenced this issue Mar 1, 2016
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: #5345
PR-URL: #5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins pushed a commit that referenced this issue Mar 1, 2016
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: #5345
PR-URL: #5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins pushed a commit that referenced this issue Mar 2, 2016
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: #5345
PR-URL: #5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants