From 0335d3d2332c946cb4ad29ae31b50391bb820faf Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 16 Jul 2024 23:33:38 -0300 Subject: [PATCH] src: cache invariant code motion --- src/node_http2.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_http2.cc b/src/node_http2.cc index 50636d24763078..a07d3ce40d9ac8 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -1652,11 +1652,12 @@ void Http2Session::HandleSettingsFrame(const nghttp2_frame* frame) { int32_t settings_id = iv[i].settings_id; if (settings_id >= IDX_SETTINGS_COUNT) { // unsupported, additional settings + auto iv_value = iv[i].value; for (size_t j = 0; j < numsettings; ++j) { if ((remote_custom_settings_.entries[j].settings_id & 0xFFFF) == settings_id) { remote_custom_settings_.entries[j].settings_id = settings_id; - remote_custom_settings_.entries[j].value = iv[i].value; + remote_custom_settings_.entries[j].value = iv_value; break; } }