Skip to content

http2: close stream and session on frameError#42147

Merged
nodejs-github-bot merged 1 commit intonodejs:masterfrom
RafaelGSS:fix/close-stream-after-frame-error
Mar 2, 2022
Merged

http2: close stream and session on frameError#42147
nodejs-github-bot merged 1 commit intonodejs:masterfrom
RafaelGSS:fix/close-stream-after-frame-error

Conversation

@RafaelGSS
Copy link
Member

Address: #35133.

From the Http2Stream#frameError event documentation:

The 'frameError' event is emitted when an error occurs while attempting to send a frame. When invoked, the handler function will receive an integer argument identifying the frame type, and an integer argument identifying the error code. The Http2Stream instance will be destroyed immediately after the 'frameError' event is emitted.

The master implementation wasn't closing the stream/session when a frameError occurs. Also, it was calling the frameError event with an nghttp2 internal error code.

This PR translates the internal error code according to RFC 7540 and closes the connection when a frameError occurs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants