From 09250813d0217641369a565b7e36dad6a9ffc35a Mon Sep 17 00:00:00 2001 From: Narcis Beleuzu Date: Tue, 6 Jun 2023 17:43:11 +0300 Subject: [PATCH] Backed out changeset 3765a21fa94c (bug 1706377) for wpt failure on 001.html . CLOSED TREE --- modules/libpref/init/StaticPrefList.yaml | 4 ++-- netwerk/protocol/http/Http2Session.cpp | 4 ---- netwerk/protocol/http/nsHttpHandler.cpp | 21 ++++++++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 133a70ad1f44..48ddbf02b062 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -12412,12 +12412,12 @@ - name: network.http.http2.ping-threshold type: RelaxedAtomicInt32 - value: 20 + value: 58 mirror: always - name: network.http.http2.ping-timeout type: RelaxedAtomicInt32 - value: 5 + value: 8 mirror: always - name: network.http.http2.send-buffer-size diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index 6d6680fc39ae..b9118d189809 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -2145,9 +2145,6 @@ nsresult Http2Session::RecvPing(Http2Session* self) { if (self->mInputFrameFlags & kFlag_ACK) { // presumably a reply to our timeout ping.. don't reply to it self->mPingSentEpoch = 0; - // We need to reset mPreviousUsed. If we don't, the next time - // Http2Session::SendPing is called, it will have no effect. - self->mPreviousUsed = false; } else { // reply with a ack'd ping self->GeneratePing(true); @@ -4331,7 +4328,6 @@ nsresult Http2Session::PushBack(const char* buf, uint32_t len) { void Http2Session::SendPing() { MOZ_ASSERT(OnSocketThread(), "not on socket thread"); - LOG(("Http2Session::SendPing %p mPreviousUsed=%d", this, mPreviousUsed)); if (mPreviousUsed) { // alredy in progress, get out diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 1904b505b49d..e20e0fa4004e 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -2141,15 +2141,18 @@ nsHttpHandler::Observe(nsISupports* subject, const char* topic, mAltSvcCache->ClearAltServiceMappings(); } } else if (!strcmp(topic, NS_NETWORK_LINK_TOPIC)) { - if (mConnMgr) { - rv = mConnMgr->PruneDeadConnections(); - if (NS_FAILED(rv)) { - LOG((" PruneDeadConnections failed (%08x)\n", - static_cast(rv))); - } - rv = mConnMgr->VerifyTraffic(); - if (NS_FAILED(rv)) { - LOG((" VerifyTraffic failed (%08x)\n", static_cast(rv))); + nsAutoCString converted = NS_ConvertUTF16toUTF8(data); + if (!strcmp(converted.get(), NS_NETWORK_LINK_DATA_CHANGED)) { + if (mConnMgr) { + rv = mConnMgr->PruneDeadConnections(); + if (NS_FAILED(rv)) { + LOG((" PruneDeadConnections failed (%08x)\n", + static_cast(rv))); + } + rv = mConnMgr->VerifyTraffic(); + if (NS_FAILED(rv)) { + LOG((" VerifyTraffic failed (%08x)\n", static_cast(rv))); + } } } } else if (!strcmp(topic, "application-background")) {