From 030fcd3a0e3bfb1648b0c8f0c00d2d650d67b55c Mon Sep 17 00:00:00 2001
From: Dragana Damjanovic
Date: Mon, 5 Oct 2020 19:03:55 +0000
Subject: [PATCH] Bug 1667351 - Process neqo events immediately after a cert
authentication is done. r=necko-reviewers,valentin
Currently we call ResumeSend() which will not process neqo events. It will only produce new packets. We are relying on other events, like timeout or a receive packet to trigger this.
Differential Revision: https://phabricator.services.mozilla.com/D92113
---
netwerk/protocol/http/Http3Session.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/netwerk/protocol/http/Http3Session.cpp b/netwerk/protocol/http/Http3Session.cpp
index 495f296dd761..083ad41f18db 100644
--- a/netwerk/protocol/http/Http3Session.cpp
+++ b/netwerk/protocol/http/Http3Session.cpp
@@ -1582,10 +1582,13 @@ void Http3Session::Authenticated(int32_t aError) {
static_cast(mError), this));
}
mHttp3Connection->PeerAuthenticated(aError);
- }
- if (mConnection) {
- Unused << mConnection->ResumeSend();
+ // Call OnQuicTimeoutExpired to properly process neqo events and outputs.
+ // We call OnQuicTimeoutExpired instead of ProcessOutputAndEvents, because
+ // HttpConnectionUDP must close this session in case of an error.
+ NS_DispatchToCurrentThread(NewRunnableMethod(
+ "net::HttpConnectionUDP::OnQuicTimeoutExpired", mSegmentReaderWriter,
+ &HttpConnectionUDP::OnQuicTimeoutExpired));
}
}