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)); } }