diff --git a/doc/api/http2.md b/doc/api/http2.md index a098a74fa31dfa..27c7c6fbecefef 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2768,6 +2768,7 @@ added: v8.4.0 changes: - version: - REPLACEME + pr-url: https://github.com/nodejs/node/pull/54875 description: Added `streamResetBurst` and `streamResetRate`. - version: - v15.10.0 diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index e456b1879e5457..d1fea4a49f0a18 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -277,7 +277,7 @@ function updateOptionsBuffer(options) { optionsBuffer[IDX_OPTIONS_STREAM_RESET_RATE] = MathMax(1, options.streamResetRate); } - if (typeof options.streamResetBurstLimit === 'number') { + if (typeof options.streamResetBurst === 'number') { flags |= (1 << IDX_OPTIONS_STREAM_RESET_BURST); optionsBuffer[IDX_OPTIONS_STREAM_RESET_BURST] = MathMax(1, options.streamResetBurst); diff --git a/src/node_http2.cc b/src/node_http2.cc index d4a710b00bb50f..f4f85b37781817 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -79,7 +79,7 @@ const Http2Session::Callbacks Http2Session::callback_struct_saved[2] = { // When the Http2Scope passes out of scope and is deconstructed, it will // call Http2Session::MaybeScheduleWrite(). Http2Scope::Http2Scope(Http2Stream* stream) : Http2Scope(stream->session()) {} -#include + Http2Scope::Http2Scope(Http2Session* session) : session_(session) { if (!session_) return; @@ -209,7 +209,8 @@ Http2Options::Http2Options(Http2State* http2_state, SessionType type) { static_cast(buffer[IDX_OPTIONS_MAX_SETTINGS])); } - if ((flags & (1 << IDX_OPTIONS_STREAM_RESET_BURST)) && (flags & (1 << IDX_OPTIONS_STREAM_RESET_RATE))) { + if ((flags & (1 << IDX_OPTIONS_STREAM_RESET_BURST)) && + (flags & (1 << IDX_OPTIONS_STREAM_RESET_RATE))) { nghttp2_option_set_stream_reset_rate_limit( option, static_cast(buffer[IDX_OPTIONS_STREAM_RESET_BURST]),