You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: destroying an unread Node prerender prelude leaves its abort listener attached #38177
The output is {before: 1, after: 1, destroyed: true, closed: true}. The unread stream has closed, but the caller's signal still holds its abort listener. That listener closes over the Fizz request and retains it while the signal remains alive.
I also reproduced this with destroy(error) and with a prelude returned by resumeAndPrerenderToNodeStream. The latter uses postponed state returned by the public prerender API, consumed and then serialised before resuming. Fully consuming a Node prelude or cancelling a Web prelude from prerender removes the listener as expected.
The expected behavior
Destroying the Node prelude should notify Fizz that the consumer has cancelled, so the listener count becomes zero without also requiring the caller to abort its signal.
This is a follow-up to the lifetime cleanup in #37315 / #36763. The Node Readables in ReactDOMFizzStaticNode have a read hook but no destruction hook. Forwarding destruction to stopFlowing and abort makes the three regression cases pass while preserving the consumed-Node, cancelled-Web and stream-error controls.
The measurements above establish listener retention; they do not measure retained heap size.
Activity