{{ message }}
Repository navigation
Commit 9a2f77a
http2: fix onread assert when destroying session from stream handler
When session.destroy() runs from a 'stream' handler, MakeCallback drains
nextTick while nghttp2 is still inside mem_recv. Close is deferred for
that window (see #64166), so later HEADERS in the same buffer created
C++ streams without a JS wrapper or onread, and DATA delivery aborted
with Assertion failed: onread->IsFunction().
- Reject new streams while the session is closing
- Destroy the C++ handle if on_headers runs after JS destroy
- Drop DATA when onread is not installed (defensive)
Fixes: #64850
Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
PR-URL: #65116
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>1 parent b4b8593 commit 9a2f77a
3 files changed
Lines changed: 78 additions & 1 deletion
File tree
- lib/internal/http2
- src
- test/parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1057 | 1067 | | |
1058 | 1068 | | |
1059 | 1069 | | |
| |||

0 commit comments