QGrpcHttp2Channel: Avoid warning on receiving multiple SETTINGS frames

Remove the warning that incorrectly triggers when a second HTTP/2
SETTINGS frame is received.

According to RFC, Section 6.5, a SETTINGS frame "MAY be sent at any
other time by either endpoint over the lifetime of the connection."

Ref: https://www.rfc-editor.org/rfc/rfc7540#section-6.5

Pick-to: 6.8
Change-Id: I83b0238405801a853c20f22629b12f67edce26e2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b2d9291983)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a734531de1)
This commit is contained in:
Dennis Oberst 2025-08-20 16:46:42 +02:00 committed by Qt Cherry-pick Bot
parent db34f8a3fb
commit b21bccbfb4
1 changed files with 1 additions and 5 deletions

View File

@ -1036,12 +1036,8 @@ void QGrpcHttp2ChannelPrivate::createHttp2Connection()
qPrintable(hostUri.toString()));
connect(m_connection, &QHttp2Connection::settingsFrameReceived, this, [this] {
if (m_state == ConnectionState::SettingsReceived) {
qCWarning(lcChannel,
"[%p] Unexpected SETTINGS frame received multiple times in this session.",
this);
if (m_state == ConnectionState::SettingsReceived)
return;
}
m_state = ConnectionState::SettingsReceived;
qCDebug(lcChannel, "[%p] SETTINGS frame received. Connection ready for use.", this);
for_each_non_expired_handler([](Http2Handler *handler) { handler->sendInitialRequest(); });