Commit 800c32d3 authored by Anatoli Papirovski's avatar Anatoli Papirovski Committed by James M Snell
Browse files

http2: fix closedCode NaN, increase test coverage

[kFinish](code) can be triggered from a 'finish' event (for example
when calling response.end) which does not pass code. That tries to
set closedCode to undefined resulting in NaN closedCode instead of
NGHTTP2_NO_ERROR. Check for code !== undefined before setting.
Adds tests for closed and closedCode.

PR-URL: https://github.com/nodejs/node/pull/15154


Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 7487d619
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment