Skip to content

net: multiple listen() events fail silently#13149

Closed
eduardbme wants to merge 1 commit intonodejs:masterfrom
eduardbme:listenhasbeencalled
Closed

net: multiple listen() events fail silently#13149
eduardbme wants to merge 1 commit intonodejs:masterfrom
eduardbme:listenhasbeencalled

Conversation

@eduardbme
Copy link
Contributor

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows [commit guidelines]

Affected core subsystem(s)

net

Description of change

Problem: It's possible to run listen() on a net.Server that's already listening to a port.
The result is silent failure, with the side effect of changing the _connectionKey and or _pipeName.

Solution: emit error if listen method called more than once.
close() method should be called between listen() method calls.

Refs: #8294
Fixes: #6190
Fixes: #11685

Previous PR #8419

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

net Issues and PRs related to the net subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that you can only listen on an already closed socket net: multiple listen() events fail silently

9 participants