Skip to content

lib: emit listening event once when call listen twice

Currently we can call listen twice with same server in cluster worker. It will make some issues.

  1. the server will emit listening event twice(See https://github.com/nodejs/node/pull/52118).
  2. resource leak if we do not clear the old resource correctly, such as the old handle.
  • 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

Merge request reports

Loading