Files
node/lib/internal
Orgad Shaneh 13220e2a32 http2: fix async context loss when trailers carry END_STREAM
The previous fix (f67e45e070) wrapped header/response event dispatch in
reqAsync.runInAsyncScope(), but missed the stream.push(null) call that
triggers the 'end' event. When END_STREAM arrives on a trailing HEADERS
frame (as gRPC does), the 'end' event fires in the session's async
context instead of the request's context.

Wrap stream.push(null) at end-of-stream in reqAsync.runInAsyncScope()
so that the 'end' event preserves the correct AsyncLocalStorage context.

Refs: https://github.com/nodejs/node/pull/55460
Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
PR-URL: https://github.com/nodejs/node/pull/63814
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-26 18:02:50 +00:00
..
2026-07-24 14:00:18 +00:00
2026-08-01 06:15:08 +00:00
2026-08-22 07:28:28 +00:00
2026-08-26 14:07:50 +00:00
2026-08-15 13:15:47 -07:00
2026-08-23 03:53:29 +00:00
…
…
…
2026-08-15 13:15:47 -07:00
2026-07-24 14:00:18 +00:00
…
2026-01-30 19:46:49 +00:00
2026-07-24 14:00:18 +00:00
2026-08-05 13:57:32 +00:00
…
…
2026-07-24 14:00:18 +00:00
…
2026-08-23 03:31:17 +00:00
2026-05-30 09:05:23 +00:00
…
2026-08-15 13:15:47 -07:00

Internal Modules

The modules located in lib/internal directory are exclusively meant for internal usage within the Node.js core. They are not intended to be accessed via user modules require(). These modules may change at any point in time. Relying on these internal modules outside the core is not supported and can lead to unpredictable behavior.

In certain scenarios, accessing these internal modules for debugging or experimental purposes might be necessary. Node.js provides the --expose-internals flag to expose these modules to userland code. This flag only exists to assist Node.js maintainers with debugging internals. It is not meant for use outside the project.