Files
node/lib
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-05 08:04:44 +00:00
…
2026-08-06 09:25:51 +00:00
2026-04-05 10:12:21 +00:00
2026-06-21 19:42:03 +00:00
2026-05-31 12:49:51 -07:00
2026-08-13 15:25:11 +00:00
…
2025-12-10 16:12:28 +00:00
…
2025-12-22 16:14:46 +00:00
2026-07-25 23:56:46 -07:00
…
2026-02-21 16:30:23 +00:00
…
2026-04-01 10:09:41 +00:00
2026-08-23 15:52:12 +00:00
2026-04-26 19:36:36 +00:00
2026-05-23 18:43:31 +00:00