commit 4f81611330f24e7ab456065843c119bf09eef684 parent fd68091d96cf339a422e17fa7f96466a4b6fef81 Author: Kershaw Chang <kershaw@mozilla.com> Date: Mon, 24 Nov 2025 07:19:55 +0000 Bug 2001573 - Ensure Http3Session is closed in HttpConnectionUDP::Close, r=necko-reviewers,jesup Differential Revision: https://phabricator.services.mozilla.com/D273556 Diffstat:
| M | netwerk/protocol/http/HttpConnectionUDP.cpp | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/netwerk/protocol/http/HttpConnectionUDP.cpp b/netwerk/protocol/http/HttpConnectionUDP.cpp @@ -618,9 +618,11 @@ void HttpConnectionUDP::Close(nsresult reason, bool aIsShutdown) { if (socket) { socket->Close(); } - - MOZ_DIAGNOSTIC_ASSERT(!mHttp3Session || mHttp3Session->IsClosed(), - "Http3Session should already be closed"); + if (mHttp3Session) { + mHttp3Session->SetCleanShutdown(true); + mHttp3Session->Close(reason); + mHttp3Session = nullptr; + } for (const auto& trans : mQueuedHttpConnectTransaction) { trans->Close(reason);