Skip to content

net: deprecate and remove Server.prototype._listen2 legacy alias #64666

Description

@araujogui

Server.prototype._listen2 is an undocumented alias for the internal setupListenHandle:

// lib/net.js
Server.prototype._listen2 = setupListenHandle;  // legacy alias

The function was renamed from _listen2 to setupListenHandle in 0ea45707a4; the alias was kept for back-compat.

It's undocumented and nothing in core calls it except listenInCluster, which routes through server._listen2(...) only to preserve an undocumented monkeypatch point (per the inline comment).

Proposal:

  1. Deprecate the _listen2 alias.
  2. After the deprecation cycle, remove it and call setupListenHandle(...) directly in listenInCluster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions