Skip to content

CustomAbortControllerSignal should not use max listeners limit #2451

Closed
@slagiewka

Description

@slagiewka

Describe the bug

Current server version uses CustomAbortControllerSignal which, unlike native AbortSignal, does not ignore the max listeners limit.

Upstream signal uses 0: nodejs/node#55816

(node:1) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to CustomAbortControllerSignal. MaxListeners is 10. Use events.setMaxListeners() to increase limit

To Reproduce Steps to reproduce the behavior:

Get the Request.signal and pass it to stuff like abortSignalAny or use addEventListener for the signal multiple times during the requests lifespan.

Expected behavior

No warning when the signal controls >= 10 processes.

Environment:

  • @whatwg-node/server@0.10.9:
  • NodeJS: v22 and v24

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions