mirror of https://github.com/qt/qtgrpc.git
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 commitb2d9291983
) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commita734531de1
)
This commit is contained in:
parent
db34f8a3fb
commit
b21bccbfb4
|
@ -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(); });
|
||||
|
|
Loading…
Reference in New Issue