Don't create client-side debug channel if the feature is disabled (#83699)
Creating the client-side debug channel when `experimental.reactDebugChannel` is falsy went unnoticed in the [original PR](https://github.com/vercel/next.js/pull/82748), because this doesn't provoke any obvious errors. The debug info is still correctly received through the main RSC stream. But it does create a memory leak, because it prevents React from closing the Flight response. On the server side, we were already guarding the feature properly using the feature flag.
Showing
Please
register
or
sign in
to comment