Skip to content

net: `net.Server.listen()` avoid operations on `null` when fail

When net.Server fails to create a new handle, an error shall be emitted in the next tick. Therefore, we make net.Server.listen() directly return to avoid following operations on null this._handle.

Fixes: https://github.com/nodejs/node/issues/23917

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading