forked from mirrors/gecko-dev
Bug 1831635: don't try to processed deferred WebTransport CreateStreams if connection is closed/refused r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D177316
This commit is contained in:
parent
9d916fde7e
commit
e4c7bf565a
1 changed files with 9 additions and 1 deletions
|
|
@ -621,6 +621,14 @@ WebTransportSessionProxy::OnStopRequest(nsIRequest* aRequest,
|
|||
}
|
||||
pendingEvents = std::move(mPendingEvents);
|
||||
pendingCreateStreamEvents = std::move(mPendingCreateStreamEvents);
|
||||
if (!pendingCreateStreamEvents.IsEmpty()) {
|
||||
if (NS_SUCCEEDED(aStatus) &&
|
||||
(mState == WebTransportSessionProxyState::DONE ||
|
||||
mState == WebTransportSessionProxyState::SESSION_CLOSE_PENDING)) {
|
||||
aStatus = NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
mStopRequestCalled = true;
|
||||
}
|
||||
|
||||
|
|
@ -633,7 +641,7 @@ WebTransportSessionProxy::OnStopRequest(nsIRequest* aRequest,
|
|||
event(status);
|
||||
}
|
||||
}));
|
||||
}
|
||||
} // otherwise let the CreateStreams just go away
|
||||
|
||||
if (listener) {
|
||||
if (succeeded) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue